Browse Source

cp_unqoute(), avoid segfault when applied to a single quote "\""

pre-master-46
rlar 16 years ago
parent
commit
d76862055e
  1. 13
      ChangeLog
  2. 2
      src/frontend/quote.c

13
ChangeLog

@ -1,7 +1,18 @@
2010-09-19 Robert Larice
* src/frontend/quote.c :
cp_unqoute(), avoid segfault when applied to a single quote "\""
testcase:
.control
echo "--"
.endc
FIXME, still not completely done,
inp_stripcomments_line()
will fail on comments inside of strings
2010-09-19 Holger Vogt
* src/spinit.in, configure.ac: allow lib64 in spinit (bug no. 3054424)
if libdir contains lib64
* compile_min.sh: new script for compiling MINGW 32 and 64 bit
* compile_min.sh: new script for compiling MINGW 32 and 64 bit
2010-09-18 Holger Vogt
* src/XSPICE/icm/makedefs.in: external LDFLAGS enabled for MINGW

2
src/frontend/quote.c

@ -81,7 +81,7 @@ cp_unquote(char *string)
l = strlen(string);
s = (char*) MALLOC(l+1);
if (*string == '"' && string[l-1] == '"') {
if (l>=2 && *string == '"' && string[l-1] == '"') {
strncpy(s,string+1,l-2);
s[l-2] = '\0';
} else

Loading…
Cancel
Save