[php-src] Issue #12791: Possible dereference of NULL

From: Date: Mon, 27 Nov 2023 08:30:55 +0000
Subject: [php-src] Issue #12791: Possible dereference of NULL
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245902@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12791 Author: VoroninArtemii ### Description There is a check of the variable set for zero in line № 633: https://github.com/php/php-src/blob/cc5a1bac6c05357b09ee4c16e73d862aba851a78/ext/mysqlnd/mysqlnd_result.c#L633 But if set == NULL, we go to line № 737: https://github.com/php/php-src/blob/cc5a1bac6c05357b09ee4c16e73d862aba851a78/ext/mysqlnd/mysqlnd_result.c#L737 Here the variable result->stored_data is dereferenced. But the variable set is equal to variable result->stored_data before checking. https://github.com/php/php-src/blob/cc5a1bac6c05357b09ee4c16e73d862aba851a78/ext/mysqlnd/mysqlnd_result.c#L629 Found by Linux Verification Center ([portal.linuxtesting.ru](http://portal.linuxtesting.ru/)) with SVACE. Author A. Voronin. ### PHP Version PHP 8.2.3 ### Operating System _No response_

« previous php.bugs (#245902) next »