HEAP_ZERO_MEMORY was: Re: Prevent passing uninitialised string to WARN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Medland," == Medland, Bill <Bill.Medland@accpac.com> writes:

    Medland,> Bill Medland (medbi01@accpac.com) Prevent trying to handle
    Medland,> uninitialised memory as a string.

    Medland,> Index: wine/loader/module.c
    Medland,> ===================================================================
    Medland,> RCS file: /home/wine/wine/loader/module.c,v retrieving
    Medland,> revision 1.144 diff -u -r1.144 module.c ---
    Medland,> wine/loader/module.c 2001/12/20 00:19:42 1.144 +++
    Medland,> wine/loader/module.c 2002/01/17 13:45:52 @@ -1379,6 +1379,7 @@
 
    Medland,>  	filename = HeapAlloc ( GetProcessHeap(), 0, MAX_PATH + 1 );
    Medland,> if ( !filename ) return NULL; 
    Medland,> + *filename = 0; /* Just in case

Wouldn't  HEAP_ZERO_MEMORY be a better argument to HeapAlloc then 0?

This would apply to many places.

Bye
-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux