Bug #68671 [Opn->Asn]: incorrect expression

From: Date: Tue, 30 Dec 2014 02:59:50 +0000
Subject: Bug #68671 [Opn->Asn]: incorrect expression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189321@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68671&edit=1 ID: 68671 Updated by: aharvey@php.net Reported by: bugreports at internot dot info Summary: incorrect expression -Status: Open +Status: Assigned Type: Bug -Package: *General Issues +Package: Filesystem function related Operating System: Linux Ubuntu 14.04 PHP Version: master-Git-2014-12-28 (Git) -Assigned To: +Assigned To: ab Block user comment: N Private report: N New Comment: Anatol, can you have a look at this, please? It appears to be related to your fix for bug #64713. Previous Comments: ------------------------------------------------------------------------ [2014-12-29 02:31:48] phpmpan at mpan dot pl The expression seems to be an attempt to silence the compiler which was pointing out a bug in the code, instead of fixing the bug. Introduced by commit cdc1a637. The bug is: 68 php_error_docref(NULL, E_NOTICE, "Warning: %s", expanded_format); 69 70 free(expanded_format); in both of these expressions expected_format may have undefined value. Additionally line 68 may be leaking memory contents to the client. ------------------------------------------------------------------------ [2014-12-28 22:43:01] bugreports at internot dot info Description: ------------ Hi, In /ext/fileinfo/libmagic/print.c: 65 if (vasprintf(&expanded_format, f, va)); /* silence */ 66 va_end(va); I believe line 65 is incorrect. Why is there an if() aroudn it, then is ended by a semi-colon? Thanks ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68671&edit=1

« previous php.bugs (#189321) next »