diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-29 17:06:37 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-29 17:07:39 +0000 |
commit | 0e5eef87d0bdbd8690d9a6863a49bee4d6a198da (patch) | |
tree | 587ed99aa711619982d59d12ee73f56ff2ba4e90 | |
parent | 380ce2eeaab5d37e5343aa2ba1fcde755ecefa23 (diff) | |
download | libguestfs-0e5eef87d0bdbd8690d9a6863a49bee4d6a198da.tar.gz libguestfs-0e5eef87d0bdbd8690d9a6863a49bee4d6a198da.tar.xz libguestfs-0e5eef87d0bdbd8690d9a6863a49bee4d6a198da.zip |
daemon: isoinfo: Fix parsing of bogus dates.
eg:
$ isoinfo --debug -d -i ubuntu-12.04-desktop-amd64.iso
CD-ROM is in ISO 9660 format
System id:
Volume id: Ubuntu 12.04 LTS amd64
Volume set id:
Publisher id:
[...]
Creation Date: 2012 04 25 16:13:46.00
Modification Date: 2012 04 25 16:13:46.00
Expiration Date: : : .
Effective Date: : : .
[...]
-rw-r--r-- | daemon/isoinfo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c index d117b40f..b37178f5 100644 --- a/daemon/isoinfo.c +++ b/daemon/isoinfo.c @@ -57,7 +57,8 @@ parse_time_t (int64_t *ret, const char *str) struct tm tm; time_t r; - if (STREQ (str, "0000 00 00 00:00:00.00")) { + if (STREQ (str, "0000 00 00 00:00:00.00") || + STREQ (str, " : : . ")) { *ret = -1; return 0; } |