Security Audit 5:13. Use proper length on strncpy.
This commit is contained in:
		| @@ -1,3 +1,7 @@ | ||||
| ------------------------------------------------------------------- | ||||
| Wed Apr 26 15:39:00 MST 2006 - jnorman@novell.com | ||||
| - Security Audit 5:13.  Use proper length on strncpy. | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Wed Apr 26 11:02:00 MST 2006 - jnorman@novell.com | ||||
| - Security Audit 5.6: Check length of ssNameLen < 256 | ||||
|   | ||||
| @@ -756,8 +756,8 @@ void ItemGetInfoCb( GnomeKeyringResult result, | ||||
| 	if (itemlen > maxlen) { | ||||
| 		itemInfo->displayName = NULL; | ||||
| 	} else { | ||||
| 		strncpy(itemInfo->displayName, item, maxlen); | ||||
| 		itemInfo->displayName[maxlen] = '\0'; | ||||
| 		strncpy(itemInfo->displayName, item, itemlen); | ||||
| 		itemInfo->displayName[itemlen] = '\0'; | ||||
| 	} | ||||
|  | ||||
| 	/* maxlen = 255. This should be one less than the size of  | ||||
| @@ -768,8 +768,8 @@ void ItemGetInfoCb( GnomeKeyringResult result, | ||||
| 	if (itemlen > maxlen) { | ||||
| 		itemInfo->secret = NULL; | ||||
| 	} else { | ||||
| 		strncpy(itemInfo->secret, item, maxlen); | ||||
| 		itemInfo->secret[maxlen] = '\0'; | ||||
| 		strncpy(itemInfo->secret, item, itemlen); | ||||
| 		itemInfo->secret[itemlen] = '\0'; | ||||
| 	} | ||||
|  | ||||
|         itemInfo->mTime = gnome_keyring_item_info_get_mtime(info); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user