-/* $OpenBSD: ber.c,v 1.12 2018/07/09 09:21:26 jca Exp $ */
+/* $OpenBSD: ber.c,v 1.13 2018/07/13 08:30:10 rob Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
return -1;
t = (t << 7) | (u & ~BER_TAG_MORE);
i++;
+ if (i > sizeof(unsigned long)) {
+ errno = ERANGE;
+ return -1;
+ }
} while (u & BER_TAG_MORE);
- if (i > sizeof(unsigned long)) {
- errno = ERANGE;
- return -1;
- }
-
*tag = t;
return i + 1;
}
-/* $OpenBSD: ber.c,v 1.22 2018/07/09 09:21:26 jca Exp $ */
+/* $OpenBSD: ber.c,v 1.23 2018/07/13 08:30:10 rob Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
return -1;
t = (t << 7) | (u & ~BER_TAG_MORE);
i++;
+ if (i > sizeof(unsigned long)) {
+ errno = ERANGE;
+ return -1;
+ }
} while (u & BER_TAG_MORE);
- if (i > sizeof(unsigned long)) {
- errno = ERANGE;
- return -1;
- }
-
*tag = t;
return i + 1;
}
-/* $OpenBSD: ber.c,v 1.41 2018/07/09 09:21:26 jca Exp $ */
+/* $OpenBSD: ber.c,v 1.42 2018/07/13 08:30:10 rob Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
return -1;
t = (t << 7) | (u & ~BER_TAG_MORE);
i++;
+ if (i > sizeof(unsigned long)) {
+ errno = ERANGE;
+ return -1;
+ }
} while (u & BER_TAG_MORE);
- if (i > sizeof(unsigned long)) {
- errno = ERANGE;
- return -1;
- }
-
*tag = t;
return i + 1;
}
-/* $OpenBSD: ber.c,v 1.24 2018/07/09 09:21:26 jca Exp $ */
+/* $OpenBSD: ber.c,v 1.25 2018/07/13 08:30:10 rob Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
return -1;
t = (t << 7) | (u & ~BER_TAG_MORE);
i++;
+ if (i > sizeof(unsigned long)) {
+ errno = ERANGE;
+ return -1;
+ }
} while (u & BER_TAG_MORE);
- if (i > sizeof(unsigned long)) {
- errno = ERANGE;
- return -1;
- }
-
*tag = t;
return i + 1;
}