Commit e3b03c1c authored by Baptiste Daroussin's avatar Baptiste Daroussin
Browse files

Only drop one '/' when performing checksum on symlinks

It is known to not be correct as it leads to adding the '\0' to the
checksum. But for compatibility we keep that behaviour for now
parent 24bf3e6e
......@@ -684,13 +684,11 @@ pkg_checksum_symlink_readlink(const char *linkbuf, int linklen,
lnk = linkbuf;
/* Skip heading slashes */
while (*lnk == '/') {
return (pkg_checksum_data(lnk, linklen, type));
* It is known that \0 is added to the checksum in case the symlink
* targets an absolute path but the behaviour is kept for compat
return (pkg_checksum_data(RELATIVE_PATH(lnk), linklen, type));
unsigned char *
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment