ldb-samba: ldif_read_objectSid avoids VLA master
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 4 May 2024 01:40:35 +0000 (13:40 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 May 2024 00:26:42 +0000 (00:26 +0000)
commit9844ac289be3430fd3f72c5e57fa00e012c5d417
treee788f3ba2cfd1f0c11b585bd74cf5792ddd69565
parentbf4af1a28a3580223fcc3a861c7fdd1b43f234d1
ldb-samba: ldif_read_objectSid avoids VLA

I don't think this variable length array is any trouble, but people
complain about them (e.g. https://nullprogram.com/blog/2019/10/27/)
because they make things more complex at run-time, and this is a
somewhat performance sensitive path.

DOM_SID_STR_BUFLEN + 1 is 191 -- if that stack allocation is going to
cause trouble, then so was the VLA <= that.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed May  8 00:26:42 UTC 2024 on atb-devel-224
lib/ldb-samba/ldif_handlers.c