From 2633aab967c38dc4b54c26e5bf6e01d2f9aac681 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 9 Feb 2009 17:46:35 +0100 Subject: [PATCH] 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. --- libisofs/libisofs.h | 4 ++-- libisofs/messages.c | 4 ++-- libisofs/rockridge_read.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index ef9be84..4a272fd 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -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 diff --git a/libisofs/messages.c b/libisofs/messages.c index 0bce876..6fe7906 100644 --- a/libisofs/messages.c +++ b/libisofs/messages.c @@ -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"; } diff --git a/libisofs/rockridge_read.c b/libisofs/rockridge_read.c index 1517693..4714c72 100644 --- a/libisofs/rockridge_read.c +++ b/libisofs/rockridge_read.c @@ -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);