From 272b1fe359fda80616a5a76b3c55715fc57306da Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 11 May 2015 16:50:35 +0000 Subject: [PATCH] Don't treat NUL (EOF) as SPACE. All the code that uses _PROP_ISSPACE() checks explicitly for _PROP_EOF() anyway, and this can be abused to cause run beyond the end of buffer DoS (Mateusz Kocielski) XXX: pullup-7 --- common/lib/libprop/prop_object_impl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/lib/libprop/prop_object_impl.h b/common/lib/libprop/prop_object_impl.h index 0548e7d51997..6b1630be0e24 100644 --- a/common/lib/libprop/prop_object_impl.h +++ b/common/lib/libprop/prop_object_impl.h @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object_impl.h,v 1.31 2012/07/27 09:10:59 pooka Exp $ */ +/* $NetBSD: prop_object_impl.h,v 1.32 2015/05/11 16:50:35 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -112,8 +112,7 @@ typedef enum { #define _PROP_EOF(c) ((c) == '\0') #define _PROP_ISSPACE(c) \ - ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r' || \ - _PROP_EOF(c)) + ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r') #define _PROP_TAG_MATCH(ctx, t) \ _prop_object_internalize_match((ctx)->poic_tagname, \