File plplot-strncat.patch of Package plplot

diff -ur plplot-5.9.8.orig//drivers/wxwidgets.cpp plplot-5.9.8//drivers/wxwidgets.cpp
--- plplot-5.9.8.orig//drivers/wxwidgets.cpp	2011-08-01 23:29:39.000000000 +0530
+++ plplot-5.9.8//drivers/wxwidgets.cpp	2011-08-02 01:06:57.323000001 +0530
@@ -231,7 +231,7 @@
             if ( ucs4[i] != (PLUNICODE) plplotEsc ) // a character to display
             {
                 ucs4_to_utf8( ucs4[i], utf8 );
-                strncat( utf8_string, utf8, max_string_length );
+                strncat( utf8_string, utf8, sizeof(utf8_string)-strlen(utf8_string)-1 );
                 i++;
                 continue;
             }
@@ -239,7 +239,7 @@
             if ( ucs4[i] == (PLUNICODE) plplotEsc ) // a escape character to display
             {
                 ucs4_to_utf8( ucs4[i], utf8 );
-                strncat( utf8_string, utf8, max_string_length );
+                strncat( utf8_string, utf8, sizeof(utf8_string)-strlen(utf8_string)-1);
                 i++;
                 continue;
             }
openSUSE Build Service is sponsored by