$NetBSD: patch-bk,v 1.5 2005/03/26 16:50:59 wennmach Exp $ From Love. --- appl/vos/vos_dump.c.orig 2005-03-23 12:41:00.000000000 +0100 +++ appl/vos/vos_dump.c 2005-03-23 12:53:50.000000000 +0100 @@ -95,14 +95,24 @@ goto out; } - if (isdigit(volume[0])) { + if (isdigit((unsigned char)volume[0])) { char *end; - vol_id = strtoul(volume, &end, 10); - if (vol_id != ULONG_MAX && *end == '\0') + long v; + v = strtoul(volume, &end, 10); + if (v != ULONG_MAX && *end == '\0') have_volid = 1; + vol_id = v; } if (!have_volid) { - int type = volname_canonicalize(volume); + char *v = strdup(volume); + int type; + + if (v == NULL) { + fprintf(stderr, "dump_volume: out of memory\n"); + goto out; + } + type = volname_canonicalize(v); + free(v); vol_id = the_vlentry.volumeId[type]; }