Author: matt
Date: 2008-01-09 13:23:51 -0800 (Wed, 09 Jan 2008)
New Revision: 6015
Log:
STR #1853: fixed potntial buffer overrun un Fl_Preferences

Modified:
   branches/branch-1.1/CHANGES
   branches/branch-1.1/src/Fl_Preferences.cxx

Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2008-01-05 09:27:49 UTC (rev 6014)
+++ branches/branch-1.1/CHANGES 2008-01-09 21:23:51 UTC (rev 6015)
@@ -5,6 +5,8 @@
          STR #1639, STR #1645, STR #1644, STR #1792, STR #1793,
          STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
          STR #1796, STR #1815, STR #1726, STR #1753)
+       - Fixed potential buffer overrun 
+         in Fl_Preferences (STR #1853)
        - Fixed method attributes in consecutive class
          declarations in FLUID (STR #1741)
        - FLUID checks for seperately declared callbacks to 

Modified: branches/branch-1.1/src/Fl_Preferences.cxx
===================================================================
--- branches/branch-1.1/src/Fl_Preferences.cxx  2008-01-05 09:27:49 UTC (rev 
6014)
+++ branches/branch-1.1/src/Fl_Preferences.cxx  2008-01-09 21:23:51 UTC (rev 
6015)
@@ -991,7 +991,10 @@
     const char *c = strchr( line, ':' );
     if ( c )
     {
-      strlcpy( nameBuffer, line, c-line+1);
+      unsigned int len = c-line+1;
+      if ( len >= sizeof( nameBuffer ) )
+        len = sizeof( nameBuffer );
+      strlcpy( nameBuffer, line, len );
       set( nameBuffer, c+1 );
     }
     else

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to