Ver código fonte
run_command: strlen() will not function if string is not null terminated
master
Aaron Marcher
7 anos atrás
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: 74B048E5C2474F9A
1 arquivos alterados com
1 adições e
1 exclusões
-
slstatus.c
|
|
@@ -426,7 +426,7 @@ run_command(const char *cmd) |
|
|
|
} |
|
|
|
fgets(buf, sizeof(buf), fp); |
|
|
|
pclose(fp); |
|
|
|
buf[strlen(buf)] = '\0'; |
|
|
|
buf[sizeof(buf)] = '\0'; |
|
|
|
|
|
|
|
if ((nlptr = strstr(buf, "\n")) != NULL) { |
|
|
|
nlptr[0] = '\0'; |
|
|
|