mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Add missing integer casts to comparsions in libarchive read.
MFC after: 2 weeks
This commit is contained in:
parent
05c7cce2cc
commit
1aafefdbe8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228772
@ -1628,7 +1628,8 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
|
||||
*/
|
||||
if (location > 0 &&
|
||||
(location + ((fsize + iso9660->logical_block_size -1)
|
||||
/ iso9660->logical_block_size)) > iso9660->volume_block) {
|
||||
/ iso9660->logical_block_size))
|
||||
> (uint32_t)iso9660->volume_block) {
|
||||
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
|
||||
"Invalid location of extent of file");
|
||||
return (NULL);
|
||||
|
@ -2530,8 +2530,8 @@ xml_data(void *userData, const char *s, int len)
|
||||
#if DEBUG
|
||||
{
|
||||
char buff[1024];
|
||||
if (len > sizeof(buff)-1)
|
||||
len = sizeof(buff)-1;
|
||||
if (len > (int)sizeof(buff)-1)
|
||||
len = (int)sizeof(buff)-1;
|
||||
memcpy(buff, s, len);
|
||||
buff[len] = 0;
|
||||
fprintf(stderr, "\tlen=%d:\"%s\"\n", len, buff);
|
||||
|
Loading…
Reference in New Issue
Block a user