[RFC PATCH] data_blob_realloc() accept 0 length argument

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Feb 16 09:34:43 UTC 2018


On Fri, Feb 16, 2018 at 03:24:55AM +0100, Timur I. Bakeyev via samba-technical wrote:
> Hi all!
> 
> I was debugging one of our VFS modules and figured out that the code fails
> when data_blob_realloc() receives a 0 as a length argument. For me, passing
> 0, although seems to be useless, but still a valid invocation of the
> function.
> 
> Apparently, guys from the SSSD team also think so
> https://pagure.io/SSSD/sssd/issue/2369.
> 
> What do you think about similar fix for the data_blob_talloc()?

Loooks good. Although I was under the impression that the talloc calls
always return !=NULL, even with 0 length.

Volker

-- 
Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list