SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
29
security/openssl/3.0/patches/patch-apps_rehash_c
Normal file
29
security/openssl/3.0/patches/patch-apps_rehash_c
Normal file
|
@ -0,0 +1,29 @@
|
|||
Avoid printf %n
|
||||
|
||||
Index: apps/rehash.c
|
||||
--- apps/rehash.c.orig
|
||||
+++ apps/rehash.c
|
||||
@@ -427,8 +427,9 @@ static int do_dir(const char *dirname, enum Hash h)
|
||||
while (bit_isset(idmask, nextid))
|
||||
nextid++;
|
||||
|
||||
- BIO_snprintf(buf, buflen, "%s%s%n%08x.%s%d",
|
||||
- dirname, pathsep, &n, bp->hash,
|
||||
+ n = BIO_snprintf(buf, buflen, "%s%s", dirname, pathsep);
|
||||
+ BIO_snprintf(&buf[n], buflen - n, "%08x.%s%d",
|
||||
+ bp->hash,
|
||||
suffixes[bp->type], nextid);
|
||||
if (verbose)
|
||||
BIO_printf(bio_out, "link %s -> %s\n",
|
||||
@@ -449,8 +450,9 @@ static int do_dir(const char *dirname, enum Hash h)
|
||||
bit_set(idmask, nextid);
|
||||
} else if (remove_links) {
|
||||
/* Link to be deleted */
|
||||
- BIO_snprintf(buf, buflen, "%s%s%n%08x.%s%d",
|
||||
- dirname, pathsep, &n, bp->hash,
|
||||
+ n = BIO_snprintf(buf, buflen, "%s%s", dirname, pathsep);
|
||||
+ BIO_snprintf(&buf[n], buflen - n, "%08x.%s%d",
|
||||
+ bp->hash,
|
||||
suffixes[bp->type], ep->old_id);
|
||||
if (verbose)
|
||||
BIO_printf(bio_out, "unlink %s\n",
|
Loading…
Add table
Add a link
Reference in a new issue