← Commit list

4ebaf1074

Denis Vlasenko
Denis Vlasenko
2007-01-19
FAILED Duration: 3s

Subject

strdup -> xstrdup sed: de-obfuscate piece of code

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+4 -3
@@ -175,12 +175,13 @@ static void parse_escapes(char *dest, char *string, int len, char from, char to)
while (i < len) {
if (string[i] == '\\') {
if (!to || string[i+1] == from) {
- *(dest++) = to ? to : string[i+1];
+ *dest++ = to ? to : string[i+1];
i += 2;
continue;
- } else *(dest++) = string[i++];
+ }
+ *dest++ = string[i++];
}
- *(dest++) = string[i++];
+ *dest++ = string[i++];
}
*dest = 0;
}
libbb/loop.c+1 -1
@@ -142,7 +142,7 @@ try_again:
}
close(ffd);
if (!rc) {
- if (!*device) *device = strdup(dev);
+ if (!*device) *device = xstrdup(dev);
return mode==O_RDONLY ? 1 : 0;
}
return rc;
networking/udhcp/files.c+1 -1
@@ -56,7 +56,7 @@ static int read_str(const char *line, void *arg)
char **dest = arg;
free(*dest);
- *dest = strdup(line);
+ *dest = xstrdup(line);
return 1;
}