Fixed memory hog in read_aaip_AA().

todo: Find the reason why node xinfo is not freed when the image is discarded.
This helped the hog to survive undetected since January 14.
This commit is contained in:
Thomas Schmitt 2009-02-09 17:46:35 +01:00
parent b09dcd5246
commit 2633aab967
3 changed files with 5 additions and 5 deletions

View File

@ -4218,7 +4218,7 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
#define ISO_AAIP_BAD_ACL_TEXT 0xE830FEAE
/* ts A90130 */
/** AAIP processing for ACL and xattr not enabled at compile time
/** AAIP processing for ACL or xattr not enabled at compile time
(FAILURE, HIGH, -339) */
#define ISO_AAIP_NOT_ENABLED 0xE830FEAD
@ -4235,7 +4235,7 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
#define ISO_AAIP_NO_SET_LOCAL 0xE830FEAA
/* ts A90206 */
/** Unallowed attempt to set an xattr with non-user name
/** Unallowed attempt to set an xattr with non-userspace name
(FAILURE, HIGH, -343) */
#define ISO_AAIP_NON_USER_NAME 0xE830FEA9

View File

@ -217,7 +217,7 @@ const char *iso_error_to_msg(int errcode)
case ISO_AAIP_BAD_ACL_TEXT:
return "Error with encoding ACL for AAIP";
case ISO_AAIP_NOT_ENABLED:
return "AAIP processing for ACL and xattr not enabled at compile time";
return "AAIP processing for ACL or xattr not enabled at compile time";
case ISO_AAIP_BAD_AASTRING:
return "Error with decoding AAIP info for ACL or xattr";
case ISO_AAIP_NO_GET_LOCAL:
@ -225,7 +225,7 @@ const char *iso_error_to_msg(int errcode)
case ISO_AAIP_NO_SET_LOCAL:
return "Error with attaching ACL or xattr to local file";
case ISO_AAIP_NON_USER_NAME:
return "Unallowed attempt to set an xattr with non-user name";
return "Unallowed attempt to set an xattr with non-userspace name";
default:
return "Unknown error";
}

View File

@ -475,7 +475,7 @@ int read_aaip_AA(struct susp_sys_user_entry *sue,
aapt[3] = 1;
aapt[4] = 0;
/* Append sue payload */
memcpy(aapt + 5, sue->data.AA.comps, sue->len_sue[0]);
memcpy(aapt + 5, sue->data.AA.comps, sue->len_sue[0] - 5);
*aa_len += sue->len_sue[0];
*is_done = !(sue->data.AA.flags[0] & 1);