Skip to content

Commit

Permalink
Fix initialization of length and checksum.
Browse files Browse the repository at this point in the history
Reported by:	Kevin Thompson
  • Loading branch information
bdrewery committed Sep 24, 2014
1 parent 6f4ae5c commit 8fb732a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libpkg/repo/binary/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,8 @@ pkg_repo_binary_update_incremental(const char *name, struct pkg_repo *repo,
offset = strsep(&p, ":");
/* files offset */
strsep(&p, ":");
if (p)
length = strsep(&p, ":\n");
/* Checksum */
if (p)
checksum = strsep(&p, ":\n");
length = p ? strsep(&p, ":\n") : NULL;
checksum = p ? strsep(&p, ":\n") : NULL;

if (origin == NULL || digest == NULL ||
offset == NULL) {
Expand Down

0 comments on commit 8fb732a

Please sign in to comment.