diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2010-02-17 17:37:16 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2010-02-17 17:37:16 +0000 |
commit | 4707ebeffc8ebdaa26cc330d4517b569fb20c481 (patch) | |
tree | 62fffa2bc099388b96aad2b22bd5987db666058b /usr.sbin | |
parent | aaa8cd760516228ec51f902bd47cde3b53fe3b70 (diff) |
in map_stdio_get() use strdup on the right buffer, not on a pointer that
will be NULL 99% of the times... fixes segv in path that's not enabled
yet
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/map.c b/usr.sbin/smtpd/map.c index 3d0f301a266..41de676ceba 100644 --- a/usr.sbin/smtpd/map.c +++ b/usr.sbin/smtpd/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.8 2010/02/17 13:47:31 gilles Exp $ */ +/* $OpenBSD: map.c,v 1.9 2010/02/17 17:37:15 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -214,7 +214,7 @@ map_stdio_get(void *hdl, char *key) if (strcmp(keyp, key) != 0) continue; - result = strdup(lbuf); + result = strdup(buf); if (result == NULL) err(1, NULL); break; |