<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/charset, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/'/>
<entry>
<title>lib: Fix blank line endings</title>
<updated>2014-12-09T03:12:07+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2014-12-07T13:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=e2ee1a42cf5b57e09604792f46dd173182a014e5'/>
<id>e2ee1a42cf5b57e09604792f46dd173182a014e5</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: Fix a typo</title>
<updated>2014-12-09T03:12:07+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2014-12-07T13:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=4debc30117a33fca1cc2667869cc6718afd62bbe'/>
<id>4debc30117a33fca1cc2667869cc6718afd62bbe</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: Simplify load_case_tables_library()</title>
<updated>2014-12-07T23:33:06+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2014-12-07T11:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=e60433efa182484c9fd480d831a21970775e0c99'/>
<id>e60433efa182484c9fd480d831a21970775e0c99</id>
<content type='text'>
We don't really need a talloc context here

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>
We don't really need a talloc context here

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/util/tests: avoid some compiler warnings</title>
<updated>2014-11-14T22:27:04+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2014-02-27T08:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=3f0c7e87947b4f086dcf421dd4209f6afa7d7f4a'/>
<id>3f0c7e87947b4f086dcf421dd4209f6afa7d7f4a</id>
<content type='text'>
Signed-off-by: Stefan Metzmacher &lt;metze@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: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>charset: Avoid compiler warnings with --enable-developer</title>
<updated>2014-09-19T16:11:11+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-09-10T01:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=d55cdc367d2048433c4862222d8b9f4ab419a35f'/>
<id>d55cdc367d2048433c4862222d8b9f4ab419a35f</id>
<content type='text'>
These:

  [ 44/309] Compiling ../lib/util/charset/util_unistr_w.c
  ../../lib/util/charset/util_unistr_w.c: In function ‘strlower_w’:
  ../../lib/util/charset/util_unistr_w.c:182:127: warning: right-hand operand of comma expression has no effect [-Wunused-value]
      COPY_UCS2_CHAR(s,&amp;v);

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These:

  [ 44/309] Compiling ../lib/util/charset/util_unistr_w.c
  ../../lib/util/charset/util_unistr_w.c: In function ‘strlower_w’:
  ../../lib/util/charset/util_unistr_w.c:182:127: warning: right-hand operand of comma expression has no effect [-Wunused-value]
      COPY_UCS2_CHAR(s,&amp;v);

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: strings: Simplify strcasecmp</title>
<updated>2014-08-05T23:05:14+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2014-08-05T09:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=64271c493df66f1dc67fae7fa14ec75f49db65af'/>
<id>64271c493df66f1dc67fae7fa14ec75f49db65af</id>
<content type='text'>
This makes us fallback to strcasecmp early if any INVALID_CODEPOINT
appears. Without this patch we just continue to compare if both strings
happen to have an INVALID_CODEPOINT in the same spot.

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>
This makes us fallback to strcasecmp early if any INVALID_CODEPOINT
appears. Without this patch we just continue to compare if both strings
happen to have an INVALID_CODEPOINT in the same spot.

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>s4: tests: Added local.charset test for Bug 10716 - smbd constantly crashes when filename contains non-ascii character</title>
<updated>2014-08-05T23:05:14+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2014-08-04T20:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=ca1617121a2a6418c2e3ab7a7ce92ddaa1368ce2'/>
<id>ca1617121a2a6418c2e3ab7a7ce92ddaa1368ce2</id>
<content type='text'>
https://bugzilla.samba.org/show_bug.cgi?id=10716

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://bugzilla.samba.org/show_bug.cgi?id=10716

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: strings: Fix the behavior of strncasecmp_m_handle() in the face of bad conversions.</title>
<updated>2014-08-05T23:05:14+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2014-08-02T04:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=dfe8dd87e15bec453c7d3a80c4c707d3f2c7b597'/>
<id>dfe8dd87e15bec453c7d3a80c4c707d3f2c7b597</id>
<content type='text'>
When either string has a bad conversion, we fall back to
doing raw ascii byte comparisons using strcasecmp(). This
is wrong - we should fall back to strncasecmp.

The problem is we've already stepped past the character
that failed the conversion, so we're not re-testing those
characters for comparison. This can have the effect of
causing strncasecmp_m_handle() to report that two strings
are identical when they are not, if the failed conversion
takes place at the end of the string.

The correct behavior is to step back to the point of
the string(s) that failed the conversion, and continue
the test from there.

This is a litle trickier than the previous fix, as
it requires converting the incoming n variable from
remaining characters to compare to remaining bytes to
compare.

As bytes are always the smallest character size
(1 byte) then it's safe to convert the remaining
characters to check by decrementing the source string
by the last character length (in bytes) and incrementing
the remaining bytes to scan by the same value, then
calling strncasecmp() with the stepped back strings
remaining.

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When either string has a bad conversion, we fall back to
doing raw ascii byte comparisons using strcasecmp(). This
is wrong - we should fall back to strncasecmp.

The problem is we've already stepped past the character
that failed the conversion, so we're not re-testing those
characters for comparison. This can have the effect of
causing strncasecmp_m_handle() to report that two strings
are identical when they are not, if the failed conversion
takes place at the end of the string.

The correct behavior is to step back to the point of
the string(s) that failed the conversion, and continue
the test from there.

This is a litle trickier than the previous fix, as
it requires converting the incoming n variable from
remaining characters to compare to remaining bytes to
compare.

As bytes are always the smallest character size
(1 byte) then it's safe to convert the remaining
characters to check by decrementing the source string
by the last character length (in bytes) and incrementing
the remaining bytes to scan by the same value, then
calling strncasecmp() with the stepped back strings
remaining.

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: strings: Fix the behavior of strcasecmp_m_handle() in the face of bad conversions.</title>
<updated>2014-08-05T23:05:14+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2014-08-02T04:29:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=9380478a0b292bcb0c11987a88803a37a064d618'/>
<id>9380478a0b292bcb0c11987a88803a37a064d618</id>
<content type='text'>
When either string has a bad conversion, we fall back to
doing raw ascii byte comparisons using strcasecmp().

The problem is we've already stepped past the character
that failed the conversion, so we're not re-testing those
characters for comparison. This can have the effect of
causing strcasecmp_m_handle() to report that two strings
are identical when they are not, if the failed conversion
takes place at the end of the string.

The correct behavior is to step back to the point of
the string(s) that failed the conversion, and continue
the test from there.

Found by &lt;lev@zadarastorage.com&gt; when investigating bug
10716 - smbd constantly crashes when filename contains non-ascii character.

Given the normal character set of utf-8, and an on
disk filename of ISO-8859-1 of file-é on disk hex
value: 66 69 6c 65 2d e9, an incoming open given the
correct utf8 name of file-é will collide when it
should not.

Fixes:

Bug 10716 - smbd constantly crashes when filename contains non-ascii character

https://bugzilla.samba.org/show_bug.cgi?id=10716

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When either string has a bad conversion, we fall back to
doing raw ascii byte comparisons using strcasecmp().

The problem is we've already stepped past the character
that failed the conversion, so we're not re-testing those
characters for comparison. This can have the effect of
causing strcasecmp_m_handle() to report that two strings
are identical when they are not, if the failed conversion
takes place at the end of the string.

The correct behavior is to step back to the point of
the string(s) that failed the conversion, and continue
the test from there.

Found by &lt;lev@zadarastorage.com&gt; when investigating bug
10716 - smbd constantly crashes when filename contains non-ascii character.

Given the normal character set of utf-8, and an on
disk filename of ISO-8859-1 of file-é on disk hex
value: 66 69 6c 65 2d e9, an incoming open given the
correct utf8 name of file-é will collide when it
should not.

Fixes:

Bug 10716 - smbd constantly crashes when filename contains non-ascii character

https://bugzilla.samba.org/show_bug.cgi?id=10716

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util/tests: add missing #include "torture/local/proto.h"</title>
<updated>2014-04-02T07:03:44+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2014-02-27T08:08:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=8ba775b0a3e22a83bca092114dbb9f345d6ff89f'/>
<id>8ba775b0a3e22a83bca092114dbb9f345d6ff89f</id>
<content type='text'>
Signed-off-by: Stefan Metzmacher &lt;metze@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: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
