You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Andrew Black <ab...@roguewave.com> on 2006/08/15 23:02:36 UTC

[patch] resolve segv in locale/localedef

Greetings all.

Below is a 2 line patch to the locale and localedef utilities that 
resolves a segfault encountered during automated testing (and adds a 
missing newline).  This problem generally shows up during stage 2 of the 
run_locale_utils.sh script.

--Andrew Black

Log:
	* scanner.cpp (Scanner::convert_escape): Correct order of arguments to 
an issue_diag call, add missing newline.

Index: scanner.cpp
===================================================================
--- scanner.cpp (revision 431602)
+++ scanner.cpp (working copy)
@@ -734,8 +734,8 @@

      if (val < 0 || val > long (UCHAR_MAX))
          issue_diag (E_INVAL, true, 0,
-                    "%s value in the range [0, %lu) expected: %s",
-                    basename, esc, long (UCHAR_MAX));
+                    "%s value in the range [0, %lu) expected: %s\n",
+                    basename, long (UCHAR_MAX), esc);

      typedef unsigned char UChar;


Re: [patch] resolve segv in locale/localedef

Posted by Martin Sebor <se...@roguewave.com>.
Andrew Black wrote:
> Greetings all.
> 
> Below is a 2 line patch to the locale and localedef utilities that 
> resolves a segfault encountered during automated testing (and adds a 
> missing newline).  This problem generally shows up during stage 2 of the 
> run_locale_utils.sh script.

Good catch! Committed thus:
http://svn.apache.org/viewvc?rev=431937&view=rev

Thanks
Martin