diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2004-09-22 06:16:54 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2004-09-22 06:16:54 +0000 |
commit | 5c1049e66b02fa2725e1f19d4ca907be58c100cf (patch) | |
tree | 3d67f3f289a4651cd7a4eb88ef5990724eb54f13 | |
parent | 1d2b76d00c571df83ffeba7411cc8e507dcdff01 (diff) | |
download | ports-5c1049e66b02fa2725e1f19d4ca907be58c100cf.tar.gz ports-5c1049e66b02fa2725e1f19d4ca907be58c100cf.zip |
Notes
-rw-r--r-- | archivers/lha/Makefile | 2 | ||||
-rw-r--r-- | archivers/lha/files/patch-command_buffer | 2 | ||||
-rw-r--r-- | archivers/lha/files/patch-dir_length_bounds_check | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/archivers/lha/Makefile b/archivers/lha/Makefile index 5b44cf13914d..9cad6f2de7dd 100644 --- a/archivers/lha/Makefile +++ b/archivers/lha/Makefile @@ -7,7 +7,7 @@ PORTNAME= lha PORTVERSION= 1.14i -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= archivers MASTER_SITES= http://www2m.biglobe.ne.jp/~dolphin/lha/prog/ DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//} diff --git a/archivers/lha/files/patch-command_buffer b/archivers/lha/files/patch-command_buffer index b7ae9a6edd83..5416429c39a3 100644 --- a/archivers/lha/files/patch-command_buffer +++ b/archivers/lha/files/patch-command_buffer @@ -133,7 +133,7 @@ diff -urNp src/lhext.c.orig lha-114i/src/lhext.c + name[255] = 0; #else - sprintf(buf, "%s -> %s", bb1, bb2); -+ sprintf(buf, sizeof(buf), "%s -> %s", bb1, bb2); ++ snprintf(buf, sizeof(buf), "%s -> %s", bb1, bb2); warning("Can't make Symbolic Link", buf); return; #endif diff --git a/archivers/lha/files/patch-dir_length_bounds_check b/archivers/lha/files/patch-dir_length_bounds_check index 7a0ae1e086e2..c9eea39754ed 100644 --- a/archivers/lha/files/patch-dir_length_bounds_check +++ b/archivers/lha/files/patch-dir_length_bounds_check @@ -4,14 +4,14 @@ } if (dir_length) { -+ if ((dir_length + name_length) > sizeof(dirname)) { ++ if ((dir_length + name_length) >= sizeof(dirname)) { + fprintf(stderr, "Insufficient buffer size\n"); + exit(112); + } strcat(dirname, hdr->name); - strcpy(hdr->name, dirname); + -+ if ((dir_length + name_length) > sizeof(hdr->name)) { ++ if ((dir_length + name_length) >= sizeof(hdr->name)) { + fprintf(stderr, "Insufficient buffer size\n"); + exit(112); + } |