Full_Name: John Morrissey Version: HEAD OS: n/a URL: http://horde.net/~jwm/software/openldap-dyngrow.patch Submission from: (NULL) (24.93.15.178) OpenLDAP (including recent HEAD) uses a staticly-defined array of a fixed size to store configuration file tokens. This presents a problem for, in particular, large objectclass definitions. I've patched HEAD to dynamically grow the array as much as needed.
moved from Incoming to Software Bugs
changed notes changed state Open to Test moved from Software Bugs to Software Enhancements
John, your patch has been applied to HEAD with changes; please test. Thanks for contributing. Pierangelo.
I'm just curious: why was the NULL-return checking on ch_realloc() added? I deliberately didn't check the return value because ch_realloc() checks for a failed BER allocation and asserts and exits if an allocation fails. AFAICT, the logging will never be called. john
jwm@horde.net wrote: > > I'm just curious: why was the NULL-return checking on ch_realloc() added? > I deliberately didn't check the return value because ch_realloc() checks > for a failed BER allocation and asserts and exits if an allocation fails. > AFAICT, the logging will never be called. That's because the cn_realloc internal might change in the future, so it is good practice to use a temporary and check the return value, to retain control of the previously alloc'd memory (and dispose of it, in case). Remember that *realloc in case of failure does not alter the previously alloced memory. cargv should be freed to clean up the heap, but since in this specific case a memory failure while reading the configuration would likely result in an abort, I didn't take care of it. Note that there was also an off by one bug when checking if cargv was full. Pierangelo. -- Dr. Pierangelo Masarati | voice: +39 02 2399 8309 Dip. Ing. Aerospaziale | fax: +39 02 2399 8334 Politecnico di Milano | mailto:pierangelo.masarati@polimi.it via La Masa 34, 20156 Milano, Italy | http://www.aero.polimi.it/~masarati
changed notes changed state Test to Release
changed notes changed state Release to Closed
applied to HEAD with changes included in re21