From 9d0b73e44d12abd9daf1e3ef6244d20ab28f0af2 Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Thu, 15 Dec 2011 19:51:24 +0000 Subject: better size check --- usr.sbin/smtpd/asr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/smtpd/asr.c b/usr.sbin/smtpd/asr.c index 0390e324914..48ee21b9efb 100644 --- a/usr.sbin/smtpd/asr.c +++ b/usr.sbin/smtpd/asr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asr.c,v 1.10 2011/07/13 16:14:43 eric Exp $ */ +/* $OpenBSD: asr.c,v 1.11 2011/12/15 19:51:23 eric Exp $ */ /* * Copyright (c) 2010,2011 Eric Faurot * @@ -1145,7 +1145,7 @@ asr_ensure_buf(struct asr_query *aq, size_t n) return (0); } - if (aq->aq_bufsize > n) + if (aq->aq_bufsize >= n) return (0); t = realloc(aq->aq_buf, n); -- cgit v1.2.3