[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev LYCgi.c patch
From: |
Klaus Weide |
Subject: |
lynx-dev LYCgi.c patch |
Date: |
Wed, 19 Apr 2000 15:24:55 -0500 (CDT) |
Revert one strcpy -> StrAllocCopy change - see added comment.
--- src/LYCgi.c.~1~ Tue Apr 18 10:26:31 2000
+++ src/LYCgi.c Wed Apr 19 15:22:31 2000
@@ -214,7 +214,12 @@
} else {
/* Found PATH_INFO data. Strip it off of pgm and into path_info. */
StrAllocCopy(path_info, pgm + strlen(pgm_buff));
- StrAllocCopy(pgm, pgm_buff);
+ /* The following is safe since pgm_buff was derived from pgm
+ by stripping stuff off its end and by HTUnEscaping, so we
+ know we have enough memory allocated for pgm. Note that
+ pgm_args may still point into that memory, so we cannot
+ reallocate pgm here. - kw */
+ strcpy(pgm, pgm_buff);
CTRACE((tfp, "LYNXCGI: stat() of %s succeeded, path_info=\"%s\".\n",
pgm_buff, path_info));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev LYCgi.c patch,
Klaus Weide <=