aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2002-03-08 04:08:05 +0000
committerhpa <hpa>2002-03-08 04:08:05 +0000
commitd849153191c7a713278df8aa8053d428751e79bf (patch)
tree5c33a28a5946c33d65f065aeef902726e205bcb7
parent60707444d72c7a95f0bcaa10b4d8dc0bdf3914de (diff)
downloadtftp-hpa-d849153191c7a713278df8aa8053d428751e79bf.tar.gz
Fix macro substitution bug; some Makefile issuestftp-hpa-0.29
-rw-r--r--CHANGES2
-rw-r--r--Makefile4
-rw-r--r--tftpd/remap.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 79eceb5..43a2de5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,8 @@ Changes in 0.29:
a "recvfrom: Interrupted system call" log message if signals
arrive at a particularly inopportune moment.
+ Fix a macro substitution bug (thanks to Richard Nyberg.)
+
Changes in 0.28:
Fix stupid one-liner bug which broke standalone mode (-l).
diff --git a/Makefile b/Makefile
index 680f26f..dd860e6 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ distclean: localdistclean $(patsubst %, %.distclean, $(SUB))
localdistclean: localclean
rm -f MCONFIG config.status config.log acconfig.h *~ \#*
rm -rf *.cache
- find . -type f \( -name \*.orig -o -name \*.rej \) | xargs -r rm -f
+ find . -type f \( -name \*.orig -o -name \*.rej \) | xargs rm -f
spotless: distclean
rm -f configure acconfig.h.in
@@ -56,7 +56,7 @@ acconfig.h: MCONFIG
# autoconf and autoheader.
acconfig.h.in: configure.in configure aclocal.m4
rm -f acconfig.h.in acconfig.h
- autoheader -f
+ autoheader
configure: configure.in aclocal.m4
rm -f MCONFIG configure config.log acconfig.h config.cache
diff --git a/tftpd/remap.c b/tftpd/remap.c
index 786699f..6534b01 100644
--- a/tftpd/remap.c
+++ b/tftpd/remap.c
@@ -78,6 +78,8 @@ static int genmatchstring(char *string, const char *pattern, const char *input,
if ( macrosub &&
(sublen = macrosub(macro, string)) >= 0 ) {
len += sublen;
+ if ( string )
+ string += sublen;
} else {
len++;
if ( string )