]> git.ipfire.org Git - thirdparty/samba.git/commit
lib:printer_driver: Added pointer validation master
authorshumikhinaka <shumikhinaka@sgu.ru>
Wed, 3 Jun 2026 21:31:45 +0000 (01:31 +0400)
committerVolker Lendecke <vl@samba.org>
Thu, 4 Jun 2026 12:05:45 +0000 (12:05 +0000)
commit51cdf8f538dfd7af82c94bff9acaefbd238ff66a
tree5d5d27dcab382a89da92553531e84b6704040ea6
parent70f59d3fff7af8e1a29b53877e07e401e5dd7a17
lib:printer_driver: Added pointer validation

If no comma is found, strchr_m will return NULL. p will be set to NULL, and
if (p) will not be executed. The variable p will remain set to NULL and will
be passed to the spoolss_driver_version_to_qword function.

If strchr_m returns NULL, the function immediately terminates and returns the
status NT_STATUS_INVALID_PARAMETER. This prevents invalid data from being
passed to subsequent functions.

Pair-Programmed-With: Dmitry Mikhalchenko <tascad@altlinux.org>
Signed-off-by: Shumikhina Ksenia <shumikhinaka@sgu.ru>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun  4 12:05:45 UTC 2026 on atb-devel-224
lib/printer_driver/printer_driver.c