Show More
@@ -466,7 +466,10 b' static int lazymanifest_setitem(' | |||
|
466 | 466 | } |
|
467 | 467 | memcpy(dest, path, plen + 1); |
|
468 | 468 | for (i = 0; i < 20; i++) { |
|
469 | sprintf(dest + plen + 1 + (i * 2), "%02hhx", hash[i]); | |
|
469 | /* Cast to unsigned, so it will not get sign-extended when promoted | |
|
470 | * to int (as is done when passing to a variadic function) | |
|
471 | */ | |
|
472 | sprintf(dest + plen + 1 + (i * 2), "%02x", (unsigned char)hash[i]); | |
|
470 | 473 | } |
|
471 | 474 | memcpy(dest + plen + 41, flags, flen); |
|
472 | 475 | dest[plen + 41 + flen] = '\n'; |
General Comments 0
You need to be logged in to leave comments.
Login now