<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/substitute.c, branch talloc-2.3.4</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>util:str_sub: talloc_free on error</title>
<updated>2021-03-11T21:42:43+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2021-03-10T09:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f67f95f009a417aca2c636e4a6d17fa87325813e'/>
<id>f67f95f009a417aca2c636e4a6d17fa87325813e</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&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: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: Replace buggy string_sub_talloc() with talloc_string_sub() in lib/util</title>
<updated>2021-03-10T08:06:25+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2021-03-10T03:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d7e620ff41d6583b5554c03abaac6c4c183d5146'/>
<id>d7e620ff41d6583b5554c03abaac6c4c183d5146</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14658

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Wed Mar 10 08:06:25 UTC 2021 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14658

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Wed Mar 10 08:06:25 UTC 2021 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>util: Fix off-by-one error in message about overflow</title>
<updated>2019-07-05T02:24:52+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-07-01T11:42:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9d90ac352d409c6cda7598a4cfbb79c2b9f75754'/>
<id>9d90ac352d409c6cda7598a4cfbb79c2b9f75754</id>
<content type='text'>
len includes space for the NUL character, so the calculation needs to
take the NUL character into account.

While touching this, drop unnecessary casts by updating format string
and update to modern debug macro.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Fri Jul  5 02:24:52 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
len includes space for the NUL character, so the calculation needs to
take the NUL character into account.

While touching this, drop unnecessary casts by updating format string
and update to modern debug macro.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Fri Jul  5 02:24:52 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>util: Avoid localised underflow</title>
<updated>2019-07-05T01:05:21+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-07-01T11:28:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5f7d82a88991d93d32f9cd1bbbfa3c3629e471c7'/>
<id>5f7d82a88991d93d32f9cd1bbbfa3c3629e471c7</id>
<content type='text'>
Avoid parenthesising an unsigned subtraction that can be negative and,
therefore, underflow.  There is no need for the parentheses and
removing them results in an expression that is evaluated left-to-right
and can not underflow.

It isn't clear that the underflow matters.  lp &lt;= ls, so if (li - lp)
underflows then ls + (li - lp) will always overflow.  This should
produce the correct answer.  However, depending on this seems wrong.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid parenthesising an unsigned subtraction that can be negative and,
therefore, underflow.  There is no need for the parentheses and
removing them results in an expression that is evaluated left-to-right
and can not underflow.

It isn't clear that the underflow matters.  lp &lt;= ls, so if (li - lp)
underflows then ls + (li - lp) will always overflow.  This should
produce the correct answer.  However, depending on this seems wrong.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>util: Fix signed/unsigned comparisons by declaring as size_t</title>
<updated>2019-07-01T06:44:13+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2019-06-25T00:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=115353a00149997f01fb9964cdbc9be4c7a0cd0a'/>
<id>115353a00149997f01fb9964cdbc9be4c7a0cd0a</id>
<content type='text'>
I may be missing something subtle but I can't see a reason for
declaring these as ssize_t.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I may be missing something subtle but I can't see a reason for
declaring these as ssize_t.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Add FALL_THROUGH statements in substitute.c</title>
<updated>2018-03-01T03:37:41+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2017-07-26T14:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=37c637766eabd1123b259acbb3ae4eeb6b10de4a'/>
<id>37c637766eabd1123b259acbb3ae4eeb6b10de4a</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</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: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: Use charset_compat.h if SAMBA_UTIL_CORE_ONLY</title>
<updated>2014-10-03T22:11:21+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-09-22T10:26:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c12aa0c444555f2c8051492083abba69fb94586f'/>
<id>c12aa0c444555f2c8051492083abba69fb94586f</id>
<content type='text'>
When doing a CTDB standalone build we don't want to use dynconfig,
since this introduces a lot of unwanted complexity.  To avoid this,
either:

* charset needs to be nobbled to avoid loading the case tables, since
  this depends on dynconfig; or

* charset needs to be avoid completely, so some functions need to be
  replaced with their ASCII counterparts.

The 2nd options seems more honest and less error-prone.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When doing a CTDB standalone build we don't want to use dynconfig,
since this introduces a lot of unwanted complexity.  To avoid this,
either:

* charset needs to be nobbled to avoid loading the case tables, since
  this depends on dynconfig; or

* charset needs to be avoid completely, so some functions need to be
  replaced with their ASCII counterparts.

The 2nd options seems more honest and less error-prone.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: Clean up includes for substitute.c</title>
<updated>2014-10-03T22:11:21+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-09-22T10:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d92940819f4162985a70f6b2c79032f75f9fce49'/>
<id>d92940819f4162985a70f6b2c79032f75f9fce49</id>
<content type='text'>
Add substitute.h.  Allows standalone compiles without external
includes.h.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add substitute.h.  Allows standalone compiles without external
includes.h.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: Replace an SMB_ASSERT()</title>
<updated>2014-10-03T22:11:21+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-09-23T18:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2426130c90b216d131330e896daf7302cc198b4a'/>
<id>2426130c90b216d131330e896daf7302cc198b4a</id>
<content type='text'>
Avoid a cyclic dependency.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid a cyclic dependency.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util Re-merge the string_sub() and all_string_sub() from source3</title>
<updated>2011-04-29T06:38:15+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2011-04-29T03:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=93ace5cc2484b53fc33d4689ccc286defbe2b728'/>
<id>93ace5cc2484b53fc33d4689ccc286defbe2b728</id>
<content type='text'>
Andrew Bartlett
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Andrew Bartlett
</pre>
</div>
</content>
</entry>
</feed>
