[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Test failures in sharutils-4.13.3
From: |
Peter Fales |
Subject: |
Test failures in sharutils-4.13.3 |
Date: |
Mon, 4 Mar 2013 16:14:34 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
I'm getting corrupt output from sharutils when the -L option is used.
If gotten as far determing that SPLIT_SIZE_LIMIT is marked as
unused when it reaches line 970 in shar.c, so archive_type_position
is not set on line 980.
970 if (HAVE_OPT(SPLIT_SIZE_LIMIT))
971 {
972 int len = snprintf (explain_text_fmt, sizeof (explain_text_fmt),
973 explain_fmt_fmt, explain_1_len, explain_2_len);
974 if ((unsigned)len >= sizeof (explain_text_fmt))
975 strcpy (explain_text_fmt, "#%-256s\n#%-256s\n");
976
977 /* May be split, provide for white space for an explanation. */
978
979 fputs ("#\n", output);
980 archive_type_position = ftell (output);
981 fprintf (output, explain_text_fmt, "", "");
982 }
When it later hits line 1385, it seeks to position 0 and clobbers the
first part of the file.
1381 if (part_number == 1)
1382 {
1383 /* Rewrite the info lines on the first header. */
1384
1385 fseek (output, archive_type_position, SEEK_SET);
1386 fprintf (output, explain_text_fmt, explain_1, explain_2);
1387 }
I don't understand the option parsing code well enough to understand
why the test on line 970 is failing.
--
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: address@hidden
Phone: 630 979 8031
- Test failures in sharutils-4.13.3,
Peter Fales <=