[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kdeprint/cups
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2003-05-22 7:33:52
[Download RAW message or body]

CVS commit by goffioul: 

Grrrrrr! strlcpy is NOT equal to strncpy, do not replace it blindly!


  M +2 -2      make_driver_db_cups.c   1.9


--- kdelibs/kdeprint/cups/make_driver_db_cups.c  #1.8:1.9
@@ -96,5 +96,5 @@ int parsePpdFile(const char *filename, F
                                 c2++;
                                 c1 = strchr(c2,'"');
-                                if (c1) strlcpy(value,c2,c1-c2);
+                                if (c1) strlcpy(value,c2,c1-c2+1);
                         }
                         else
@@ -108,5 +108,5 @@ int parsePpdFile(const char *filename, F
                                 while (*c2 && isspace(*c2))
                                         c2--;
-                                strlcpy(value,c1,c2-c1+1);
+                                strlcpy(value,c1,c2-c1+2);
                         }
                 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic