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