Fix valgrind reported errors reading past the end of the buffer
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3087 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -128,7 +128,7 @@ nm_supplicant_config_add_option (NMSupplicantConfig *self,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
opt->value = g_malloc0 (sizeof (char) * len);
|
||||
opt->value = g_malloc0 ((sizeof (char) * len) + 1);
|
||||
if (opt->value == NULL) {
|
||||
nm_debug ("Couldn't allocate memory for new config option value.");
|
||||
g_slice_free (ConfigOption, opt);
|
||||
|
Reference in New Issue
Block a user