Hi,
Ran scan-build on toybox and found some errors. This fix removed an error
in password.c, but I'm not sure if it's the right fix.
Thanks,
Cindy
diff -r 2997847aa299 lib/password.c
--- a/lib/password.c Mon Nov 10 17:17:17 2014 -0600
+++ b/lib/password.c Tue Nov 11 11:04:05 2014 -0800
@@ -8,7 +8,7 @@
// generate appropriate random salt string for given encryption algorithm.
int get_salt(char *salt, char *algo)
-{
+{
struct {
char *type, id, len;
} al[] = {{"des", 0, 2}, {"md5", 1, 8}, {"sha256", 5, 16}, {"sha512", 6,
16}};
@@ -157,6 +157,7 @@
*sfx = '-';
ret = unlink(filenamesfx);
+ if (ret < 0) error_msg("can't unlink file");
ret = link(filename, filenamesfx);
if (ret < 0) error_msg("can't create backup file");
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net