summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/asr_utils.c
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2013-04-02 21:23:17 +0000
committereric <eric@openbsd.org>2013-04-02 21:23:17 +0000
commit6f68500a6cde7b03e4c71f5ef890f424b43c8aa0 (patch)
tree9f3f8de127be74a7b1b2f820ef2c353d116bc258 /lib/libc/asr/asr_utils.c
parentRevert rev 1.21 to fix a race condition where multiple mkdir -p's trying (diff)
downloadwireguard-openbsd-6f68500a6cde7b03e4c71f5ef890f424b43c8aa0.tar.xz
wireguard-openbsd-6f68500a6cde7b03e4c71f5ef890f424b43c8aa0.zip
make sure we always point before the current offset.
spotted by matthew@
Diffstat (limited to 'lib/libc/asr/asr_utils.c')
-rw-r--r--lib/libc/asr/asr_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/asr/asr_utils.c b/lib/libc/asr/asr_utils.c
index 41112550b04..ef72718531d 100644
--- a/lib/libc/asr/asr_utils.c
+++ b/lib/libc/asr/asr_utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asr_utils.c,v 1.5 2013/04/01 15:49:54 deraadt Exp $ */
+/* $OpenBSD: asr_utils.c,v 1.6 2013/04/02 21:23:17 eric Exp $ */
/*
* Copyright (c) 2009-2012 Eric Faurot <eric@faurot.net>
*
@@ -133,7 +133,7 @@ dname_expand(const unsigned char *data, size_t len, size_t offset,
return (-1);
if (end < offset + 2)
end = offset + 2;
- offset = ptr;
+ offset = start = ptr;
continue;
}
if (offset + n + 1 > len)