[geany/geany] 04c721: make: Avoid reading an uninitialized value on empty target names

Colomban Wendling git-noreply at xxxxx
Mon Apr 20 18:01:18 UTC 2015

Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 20 Apr 2015 18:01:18 UTC
Commit:      04c721c3b41dee1fbc82e94dab74f35087b60333

Log Message:
make: Avoid reading an uninitialized value on empty target names

Fixing this is however only theoretically useful, as:
* no actual code paths can currently lead to it;
* even if the code actually ended up reading the uninitialized value,
  it would still have a fully defined behavior as the result of the
  check is irrelevant in the only case the uninitialized read can

Anyway, fix this to avoid any possible bad surprises in the future.

Modified Paths:

Modified: tagmanager/ctags/make.c
2 lines changed, 1 insertions(+), 1 deletions(-)
@@ -75,7 +75,7 @@ static boolean isSpecialTarget (vString *const name)
 	size_t i = 0;
 	/* All special targets begin with '.'. */
-	if (vStringChar (name, i++) != '.') {
+	if (vStringLength (name) < 1 || vStringChar (name, i++) != '.') {
 		return FALSE;
 	while (i < vStringLength (name)) {

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list