=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/signify/signify.c,v retrieving revision 1.77 retrieving revision 1.78 diff -c -r1.77 -r1.78 *** src/usr.bin/signify/signify.c 2014/05/06 23:33:04 1.77 --- src/usr.bin/signify/signify.c 2014/05/06 23:50:53 1.78 *************** *** 1,4 **** ! /* $OpenBSD: signify.c,v 1.77 2014/05/06 23:33:04 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst * --- 1,4 ---- ! /* $OpenBSD: signify.c,v 1.78 2014/05/06 23:50:53 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst * *************** *** 544,550 **** char *line, *endline; struct checksum *checksums = NULL, *c = NULL; int nchecksums = 0; ! int i, j, uselist, count, hasfailed; int *failures; line = msg; --- 544,550 ---- char *line, *endline; struct checksum *checksums = NULL, *c = NULL; int nchecksums = 0; ! int i, j, rv, uselist, count, hasfailed; int *failures; line = msg; *************** *** 554,563 **** err(1, "realloc"); c = &checksums[nchecksums++]; if ((endline = strchr(line, '\n'))) ! *endline++ = 0; ! if (sscanf(line, "%255s %1023s = %1023s", ! c->algo, buf, c->hash) != 3 || ! buf[0] != '(' || buf[strlen(buf) - 1] != ')') errx(1, "unable to parse checksum line %s", line); buf[strlen(buf) - 1] = 0; strlcpy(c->file, buf + 1, sizeof(c->file)); --- 554,563 ---- err(1, "realloc"); c = &checksums[nchecksums++]; if ((endline = strchr(line, '\n'))) ! *endline++ = '\0'; ! rv = sscanf(line, "%255s %1023s = %1023s", ! c->algo, buf, c->hash); ! if (rv != 3 || buf[0] != '(' || buf[strlen(buf) - 1] != ')') errx(1, "unable to parse checksum line %s", line); buf[strlen(buf) - 1] = 0; strlcpy(c->file, buf + 1, sizeof(c->file));