iso9660.c: off-by-one bug which was causing dates to come out
wrong. Thanks to Nicolas Boullis for finding and fixing. iso9660_fs.c: remove bugs merging code from the last round of changes/enhancements check_common_fn.in: show full iso_read command when it fails.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.c,v 1.30 2007/08/04 00:43:26 rocky Exp $
|
||||
$Id: iso9660.c,v 1.31 2007/09/05 11:17:36 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
||||
@@ -57,7 +57,7 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'};
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.30 2007/08/04 00:43:26 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.31 2007/09/05 11:17:36 rocky Exp $";
|
||||
|
||||
/* Variables to hold debugger-helping enumerations */
|
||||
enum iso_enum1_s iso_enums1;
|
||||
@@ -183,7 +183,7 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
{ \
|
||||
char num[10]; \
|
||||
memcpy(num, p_ldate->LT_FIELD, sizeof(p_ldate->LT_FIELD)); \
|
||||
num[sizeof(p_ldate->LT_FIELD)+1] = '\0'; \
|
||||
num[sizeof(p_ldate->LT_FIELD)] = '\0'; \
|
||||
errno = 0; \
|
||||
p_tm->TM_FIELD = strtol(num, \
|
||||
(char **)NULL, 10)+ADD_CONSTANT; \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660_fs.c,v 1.41 2007/08/12 12:41:10 rocky Exp $
|
||||
$Id: iso9660_fs.c,v 1.42 2007/09/05 11:17:36 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2007 Rocky Bernstein <rocky@gnu.org>
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.41 2007/08/12 12:41:10 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.42 2007/09/05 11:17:36 rocky Exp $";
|
||||
|
||||
/* Implementation of iso9660_t type */
|
||||
struct _iso9660_s {
|
||||
@@ -1101,11 +1101,6 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root,
|
||||
unsigned int i_trans_fname=strlen(p_stat->filename);
|
||||
int trans_len;
|
||||
|
||||
if (trans_fname == NULL) {
|
||||
cdio_warn("can't allocate %lu bytes",
|
||||
(long unsigned int) strlen(p_stat->filename));
|
||||
return NULL;
|
||||
}
|
||||
if (i_trans_fname) {
|
||||
trans_fname = calloc(1, i_trans_fname+1);
|
||||
if (!trans_fname) {
|
||||
@@ -1187,13 +1182,13 @@ fs_stat_translate (void *p_image, stat_root_t stat_root,
|
||||
iso9660_stat_t *p_stat;
|
||||
|
||||
if (!p_image) return NULL;
|
||||
if (psz_path) return NULL;
|
||||
if (!psz_path) return NULL;
|
||||
|
||||
p_root = stat_root (p_image);
|
||||
if (!p_root) return NULL;
|
||||
|
||||
p_psz_splitpath = _cdio_strsplit (psz_path, '/');
|
||||
p_stat = _fs_stat_traverse (p_image, p_root, p_psz_splitpath);
|
||||
p_stat = stat_traverse (p_image, p_root, p_psz_splitpath);
|
||||
free(p_root);
|
||||
_cdio_strfreev (p_psz_splitpath);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: check_common_fn.in,v 1.11 2005/01/29 14:50:34 rocky Exp $
|
||||
# $Id: check_common_fn.in,v 1.12 2007/09/05 11:17:37 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
# Copyright (C) 2003, 2004, 2005, 2007 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -141,7 +141,7 @@ test_iso_read() {
|
||||
return 77
|
||||
fi
|
||||
else
|
||||
echo "$0 failed running: ${ISO_READ} ${opts}"
|
||||
echo "$0 failed running: ${ISO_READ} ${opts} -o ${outfile}"
|
||||
return 2
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user