From 3308a5199c77a9f2f26b8719508f3de45a1486dc Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 2 Apr 2008 14:46:37 +0000 Subject: [PATCH] Fix buffer overflow in config parser. --- lib/libfetch/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 39333e672a..bdd393aae8 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libfetch/common.c,v 1.50 2005/02/16 12:46:46 des Exp $ - * $DragonFly: src/lib/libfetch/common.c,v 1.4 2007/08/05 21:48:12 swildner Exp $ + * $DragonFly: src/lib/libfetch/common.c,v 1.5 2008/04/02 14:46:37 joerg Exp $ */ #include @@ -653,7 +653,7 @@ _fetch_read_word(FILE *f) { static char word[1024]; - if (fscanf(f, " %1024s ", word) != 1) + if (fscanf(f, " %1023s ", word) != 1) return (NULL); return (word); } -- 2.11.4.GIT