[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ber_bvstrdup("") returns pointer to freed memory (ITS#1662)
Full_Name: Hallvard B. Furuseth
Version: 2.0.23
OS: Solaris
URL:
Submission from: (NULL) (158.36.148.34)
When passed an empty string, ber_bvstrdup() returns
struct berval * { 0, freed string }. Fix:
--- openldap-2.0.23/libraries/liblber/memory.c~ Fri Jan 4 21:38:19 2002
+++ openldap-2.0.23/libraries/liblber/memory.c Mon Mar 18 23:44:07 2002
@@ -531,3 +531,3 @@
- if( new == NULL || *p == '\0' ) {
+ if( new == NULL ) {
LBER_FREE( p );