<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/lib/util_tdb.c, branch talloc-2.3.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>s3/lib: don't write to buffer (which might be NULL) if bufsize &lt;=0</title>
<updated>2019-05-29T10:10:23+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2019-05-21T13:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5477b83db28c67743e25a638c93bc4117a8a7ced'/>
<id>5477b83db28c67743e25a638c93bc4117a8a7ced</id>
<content type='text'>
Some code depends that tdb_pack[va] will return the bytes it would
write to 'buf' if the bufsize passed in is &lt;=0, writing to the
buffer is protected by with lines like
   if (bufsize &amp;&amp; bufsize &gt;= len) {
      /* write to 'buf' */
   }

however in these instances the local pointer to the buffer is still
modified
   buf += len;

It's quite probable if bufsize == 0 that buf itself is NULL,
in this case we should protect against performing pointer arithmetic.

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some code depends that tdb_pack[va] will return the bytes it would
write to 'buf' if the bufsize passed in is &lt;=0, writing to the
buffer is protected by with lines like
   if (bufsize &amp;&amp; bufsize &gt;= len) {
      /* write to 'buf' */
   }

however in these instances the local pointer to the buffer is still
modified
   buf += len;

It's quite probable if bufsize == 0 that buf itself is NULL,
in this case we should protect against performing pointer arithmetic.

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:lib: Fix undefined behavior in tdb_unpack()</title>
<updated>2018-12-03T23:23:02+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-11-27T07:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2b2edccb5a90f23db0bd733551ac645d6ac4e44f'/>
<id>2b2edccb5a90f23db0bd733551ac645d6ac4e44f</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;

Autobuild-User(master): Gary Lockyer &lt;gary@samba.org&gt;
Autobuild-Date(master): Tue Dec  4 00:23:03 CET 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;

Autobuild-User(master): Gary Lockyer &lt;gary@samba.org&gt;
Autobuild-Date(master): Tue Dec  4 00:23:03 CET 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:lib: Fix undefined behavior in tdb_pack()</title>
<updated>2018-12-03T20:16:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-11-22T12:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=86592673fbd3399b35832ca138681b06cb007b2c'/>
<id>86592673fbd3399b35832ca138681b06cb007b2c</id>
<content type='text'>
util_tdb.c:98:5: runtime error: null pointer passed as argument 2, which
is declared to never be null

This means the second argument of memcpy() can't be NULL.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
util_tdb.c:98:5: runtime error: null pointer passed as argument 2, which
is declared to never be null

This means the second argument of memcpy() can't be NULL.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:lib: Fix uninitialized variable</title>
<updated>2018-12-03T20:16:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-11-23T11:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4e9b3ed4126fad653f219334cbca2dbf53ddfc20'/>
<id>4e9b3ed4126fad653f219334cbca2dbf53ddfc20</id>
<content type='text'>
util_tdb.c:116:7: error: ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   buf += len;
       ^~
../../source3/lib/util_tdb.c:44:6: note: ‘len’ was declared here
  int len;
      ^~~

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
util_tdb.c:116:7: error: ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   buf += len;
       ^~
../../source3/lib/util_tdb.c:44:6: note: ‘len’ was declared here
  int len;
      ^~~

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Remove unused tdb_trans_* functions</title>
<updated>2018-10-27T19:24:24+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-09-25T15:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=94f8a690f66718f14e3bddab40215d1d4ce72cfb'/>
<id>94f8a690f66718f14e3bddab40215d1d4ce72cfb</id>
<content type='text'>
The transactions have all moved to dbwrap

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The transactions have all moved to dbwrap

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tdb_unpack: Protect against overflow</title>
<updated>2018-10-08T20:17:09+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-10-04T09:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ba787dc4ad3fd7195aee56567be9317358197bab'/>
<id>ba787dc4ad3fd7195aee56567be9317358197bab</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tdb_unpack: Correct "len" arg for "B" format</title>
<updated>2018-10-08T20:17:09+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-10-04T09:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0c0c79b32e6c28f5e87caf57d9302c263952db71'/>
<id>0c0c79b32e6c28f5e87caf57d9302c263952db71</id>
<content type='text'>
All but one of the users of the "B" format specifier passed in a pointer
to uint32_t instead of what tdb_unpack expected, an "int". Because this
is a purely internal API, change the tdb_unpack function and adjust that
one caller.

To reviewers: Please check carefully, thanks :-)

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All but one of the users of the "B" format specifier passed in a pointer
to uint32_t instead of what tdb_unpack expected, an "int". Because this
is a purely internal API, change the tdb_unpack function and adjust that
one caller.

To reviewers: Please check carefully, thanks :-)

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tdb_unpack: Convert to size_t for internal calculations</title>
<updated>2018-10-08T20:17:09+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-10-04T08:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8f211efb3a79f24d9542e1c2472633cce2334208'/>
<id>8f211efb3a79f24d9542e1c2472633cce2334208</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Remove unused tdb_pack_append()</title>
<updated>2018-10-02T23:07:15+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2018-09-25T15:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=826a212771e521eadc0229ed8631a7f9a7f96215'/>
<id>826a212771e521eadc0229ed8631a7f9a7f96215</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3-lib: Fix format-nonliteral warning</title>
<updated>2016-08-23T23:33:50+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2016-08-07T08:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e9b8751b587c1eabc4c1a7a7d75e3c4498c6ffc4'/>
<id>e9b8751b587c1eabc4c1a7a7d75e3c4498c6ffc4</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
