mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 20:39:46 +00:00
Fix uninitialized usage of a variable, fix crash in r_str_append (#17830)
In file included from rtr.c:234:0: rtr_http.c: In function 'r_core_rtr_http_run.isra.1': rtr_http.c:403:44: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized] path = (*index == '/')? strdup (index): r_str_append (path, index); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Co-authored-by: pancake <pancake@nopcode.org>
This commit is contained in:
parent
e3f3da5a9e
commit
6009345d63
@ -374,7 +374,7 @@ static int r_core_rtr_http_run(RCore *core, int launch, int browse, const char *
|
||||
} else {
|
||||
const char *root = r_config_get (core->config, "http.root");
|
||||
const char *homeroot = r_config_get (core->config, "http.homeroot");
|
||||
char *path;
|
||||
char *path = NULL;
|
||||
if (!strcmp (rs->path, "/")) {
|
||||
free (rs->path);
|
||||
if (*index == '/') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user