Package: unifdef
Version: 1.0+20030701-1
Severity: important
Running "unifdef -UBARF" over the file:
char foo[] = "rm -rf /*";
causes a warning that the file ends within a comment. That's not so
bad. However, since the text following up to the next "*/" will be
considered to be in a comment, it won't go through proper unifdef
processing:
$ cat unifdef-test.c
#ifdef FOO
int a;
#endif
char foo[] = "rm -rf /*";
#ifdef FOO
int b;
#endif
/* baz */
$ unifdef -UFOO < unifdef-test.c
char foo[] = "rm -rf /*";
#ifdef FOO
int b;
#endif
/* baz */
$
Workarounds:
Immediately follow any such string literals with /* */ comments.
Use "\" before the "*", though that generates a warning from gcc about
an unknown escape sequence.
Construct the string literal from two, e.g.:
char foo[] = "rm -rf /" "*";
-- System Information:
Debian Release: 5.0.6
APT prefers stable
APT policy: (1001, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages unifdef depends on:
ii libc6 2.7-18lenny4 GNU C Library: Shared libraries
unifdef recommends no packages.
unifdef suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]