diff options
author | Damien Miller <djm@mindrot.org> | 2010-03-04 21:52:18 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-03-04 21:52:18 +1100 |
commit | 2befbad9b3c8fc6e4e564c062870229bc722734c (patch) | |
tree | c3aeacfbd492b1e97b7c6664b9bfd23735370317 | |
parent | fe588e3c8434e6c9017b649dad71ef282a5dac01 (diff) |
- djm@cvs.openbsd.org 2010/03/04 01:44:57
[key.c]
use buffer_get_string_ptr_ret() where we are checking the return
value explicitly instead of the fatal()-causing buffer_get_string_ptr()
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | key.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -18,6 +18,10 @@ | |||
18 | - djm@cvs.openbsd.org 2010/03/03 22:50:40 | 18 | - djm@cvs.openbsd.org 2010/03/03 22:50:40 |
19 | [PROTOCOL.certkeys] | 19 | [PROTOCOL.certkeys] |
20 | s/similar same/similar/; from imorgan AT nas.nasa.gov | 20 | s/similar same/similar/; from imorgan AT nas.nasa.gov |
21 | - djm@cvs.openbsd.org 2010/03/04 01:44:57 | ||
22 | [key.c] | ||
23 | use buffer_get_string_ptr_ret() where we are checking the return | ||
24 | value explicitly instead of the fatal()-causing buffer_get_string_ptr() | ||
21 | 25 | ||
22 | 20100303 | 26 | 20100303 |
23 | - (djm) [PROTOCOL.certkeys] Add RCS Ident | 27 | - (djm) [PROTOCOL.certkeys] Add RCS Ident |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.c,v 1.84 2010/03/03 01:44:36 djm Exp $ */ | 1 | /* $OpenBSD: key.c,v 1.85 2010/03/04 01:44:57 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * read_bignum(): | 3 | * read_bignum(): |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1069,8 +1069,8 @@ cert_parse(Buffer *b, Key *key, const u_char *blob, u_int blen) | |||
1069 | buffer_append(&tmp, constraints, clen); | 1069 | buffer_append(&tmp, constraints, clen); |
1070 | /* validate structure */ | 1070 | /* validate structure */ |
1071 | while (buffer_len(&tmp) != 0) { | 1071 | while (buffer_len(&tmp) != 0) { |
1072 | if (buffer_get_string_ptr(&tmp, NULL) == NULL || | 1072 | if (buffer_get_string_ptr_ret(&tmp, NULL) == NULL || |
1073 | buffer_get_string_ptr(&tmp, NULL) == NULL) { | 1073 | buffer_get_string_ptr_ret(&tmp, NULL) == NULL) { |
1074 | error("%s: Constraints data invalid", __func__); | 1074 | error("%s: Constraints data invalid", __func__); |
1075 | goto out; | 1075 | goto out; |
1076 | } | 1076 | } |