Hi Kingsley

Sorry for the late reaction. I have looked into this and can reproduce
the problem. Bascially, mondoarchive's memory management not very good
when it comes to string handling. This is currently being fixed
upstream. The reason this showing up as a problem is that version 2.3.5
is substantially stricter than 2.3.2.

A more detailed explanation of the issue is actually given by C. Andy
Martin in bug #328682.

In your particular case what happens is that in
libmondo-archive.c->call_mindi_to_supply_boot_disks() the first sprintf
(line 702) yields a string of 433 characters but MAX_STR_LEN is only
380. The subsequent free then fails.

The attached patch increases MAX_STR_LEN to 512 chararcters which should
provide a sufficient buffer to avoid the worst. The real fix is as I
said above currently implemented upstream but may take some time to
complete.

Could you check it out and let me know what you think?

Cheers
Andree

On Sun, 2005-10-30 at 14:31 -0800, Kingsley G. Morse Jr. wrote:
> I worked around the error with
> 
>     $ MALLOC_CHECK_=0 mondoarchive <options go here ... >
> 
> As an aside, the following command doesn't elicit
> the error
> 
>     $ mondoarchive -OVr -d /dev/dvd -9 -I /etc
>     
> Thanks,
> Kingsley
> 
> 
> 
-- 
Andree Leidenfrost
Sydney - Australia

--- my-stuff.h.orig	2005-10-30 21:36:11.000000000 +1100
+++ my-stuff.h	2005-10-30 21:36:33.000000000 +1100
@@ -260,7 +260,7 @@
 #define NOOF_ERR_LINES 6	        ///< The number of lines of log output to keep at the bottom of the screen.
 #define ARBITRARY_MAXIMUM 2000	///< The maximum number of items showing at once in the mountlist or filelist editor.
 #define MAX_TAPECATALOG_ENTRIES 4096 ///< The maximum number of entries in the tape catalog.
-#define MAX_STR_LEN 380		///< The maximum length of almost all @p char buffers in Mondo.
+#define MAX_STR_LEN 512		///< The maximum length of almost all @p char buffers in Mondo.
 #define MAXIMUM_RAID_DEVS 32	///< The maximum number of RAID devices in the raidlist.
 #define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist.
 #define MAXIMUM_DISKS_PER_RAID_DEV 32 ///< The maximum number of disks per RAID device in the raidtab.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to