buf is at all times kept nul terminated, so there is no need to enforce
this again upon exit. (no need to move buf around after we exahust space.)
ok beck miod
-/* $OpenBSD: obj_dat.c,v 1.34 2015/10/14 21:25:16 beck Exp $ */
+/* $OpenBSD: obj_dat.c,v 1.35 2015/10/14 21:54:10 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (i == -1)
goto err;
if (i >= buf_len) {
- buf += buf_len - 1;
buf_len = 0;
} else {
buf += i;
if (i == -1)
goto err;
if (i >= buf_len) {
- buf += buf_len - 1;
buf_len = 0;
} else {
buf += i;
err:
ret = 0;
- buf[0] = '\0';
goto out;
}
-/* $OpenBSD: obj_dat.c,v 1.34 2015/10/14 21:25:16 beck Exp $ */
+/* $OpenBSD: obj_dat.c,v 1.35 2015/10/14 21:54:10 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (i == -1)
goto err;
if (i >= buf_len) {
- buf += buf_len - 1;
buf_len = 0;
} else {
buf += i;
if (i == -1)
goto err;
if (i >= buf_len) {
- buf += buf_len - 1;
buf_len = 0;
} else {
buf += i;
err:
ret = 0;
- buf[0] = '\0';
goto out;
}