diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-02-05 04:10:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-02-05 04:10:49 +0000 |
commit | 3ad1e9fe525c4129ca4e89a4230a0340616b3637 (patch) | |
tree | 7906c095b10db89e11cea55fe8c92605dc73851b /lib/libc/locale | |
parent | dd20efbe6936453f9f17ff6e3c79495dac656811 (diff) |
avoid an uninitialised value in a return path added in rev 1.5
ok tobias@
Diffstat (limited to 'lib/libc/locale')
-rw-r--r-- | lib/libc/locale/rune.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/locale/rune.c b/lib/libc/locale/rune.c index 83a65536688..7774859df86 100644 --- a/lib/libc/locale/rune.c +++ b/lib/libc/locale/rune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rune.c,v 1.5 2015/12/06 11:54:59 tobias Exp $ */ +/* $OpenBSD: rune.c,v 1.6 2016/02/05 04:10:48 jsg Exp $ */ /* $NetBSD: rune.c,v 1.26 2004/05/09 11:26:33 kleink Exp $ */ /*- @@ -129,8 +129,10 @@ readentry(_RuneRange *rr, FILE *fp) continue; } - if (re[i].re_max < re[i].re_min) + if (re[i].re_max < re[i].re_min) { + error = EINVAL; goto fail; + } l = re[i].re_max - re[i].re_min + 1; re[i].re_rune_types = calloc(l, sizeof(_RuneType)); |