From: Andrea Corallo Date: Sat, 8 Jun 2019 15:24:47 +0000 (+0200) Subject: fix uninitialized read X-Git-Tag: emacs-28.0.90~2727^2~1505 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=34d1a15307a4cb1f667e8af6ecca523369c436c1;p=emacs.git fix uninitialized read --- diff --git a/src/comp.c b/src/comp.c index e46cd5cfecf..44d9a783f0e 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1355,9 +1355,13 @@ DEFUN ("native-compile", Fnative_compile, Snative_compile, /* FIXME how many other characters are not allowed in C? This will introduce name clashs too. */ - for (int i; i < strlen(c_f_name); i++) - if (c_f_name[i] == '-') - c_f_name[i] = '_'; + char *c = c_f_name; + while (*c) + { + if (*c == '-') + *c = '_'; + ++c; + } func = indirect_function (func); if (!COMPILEDP (func))