diff options
author | Peter Anvin <hpa@tazenda.sc.orionmulti.com> | 2005-10-13 10:41:10 -0700 |
---|---|---|
committer | Peter Anvin <hpa@tazenda.sc.orionmulti.com> | 2005-10-13 10:41:10 -0700 |
commit | 8a2f69609767fd71d9f88367e6088c07e8ff3b66 (patch) | |
tree | b4185d8d4807c31dd3f63f1d006c10b9c4a5b7fd | |
parent | cbf26dca811026d69d775d0953da2645044a0d8c (diff) | |
download | tftp-hpa-8a2f69609767fd71d9f88367e6088c07e8ff3b66.tar.gz |
Handle transformations with matches
-rw-r--r-- | tftpd/remap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tftpd/remap.c b/tftpd/remap.c index 3fa0fc0..dda5632 100644 --- a/tftpd/remap.c +++ b/tftpd/remap.c @@ -90,8 +90,9 @@ static int genmatchstring(char *string, const char *pattern, const char *input, mlen = pmatch[n].rm_eo - pmatch[n].rm_so; len += mlen; if ( string ) { - memcpy(string, input+pmatch[n].rm_so, mlen); - string += mlen; + const char *p = input+pmatch[n].rm_so; + while ( mlen-- ) + *string++ = xform(*p++); } } break; |