DtMmdb: Initialize "oid_in_string_buf" to 0 to ensure "get_oid_2" returns a
correct "oid".
This commit is contained in:
@@ -75,6 +75,7 @@ char* get_oid_2(info_lib* infolib_ptr, char* base_str, char* locator)
|
|||||||
const char *this_node_locator = x.locator();
|
const char *this_node_locator = x.locator();
|
||||||
|
|
||||||
if ( strcmp( this_node_locator, locator) == 0 ) {
|
if ( strcmp( this_node_locator, locator) == 0 ) {
|
||||||
|
memset(oid_in_string_buf, 0, BUFSIZ);
|
||||||
ostringstream strout(oid_in_string_buf, ios::out);
|
ostringstream strout(oid_in_string_buf, ios::out);
|
||||||
x.its_oid().asciiOut(strout);
|
x.its_oid().asciiOut(strout);
|
||||||
int len = strout.str().size();
|
int len = strout.str().size();
|
||||||
|
|||||||
Reference in New Issue
Block a user