Introduction
Introduction Statistics Contact Development Disclaimer Help
arg.h: fixed argv checks order - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit b002d13b34f69f0efc797b252f9db0878262581d
parent d22ff2f488be69cd455837b5dfdff0aad1aea812
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 11 Jun 2017 19:49:06 +0200
arg.h: fixed argv checks order
This prevents accessing to a potentially out-of-bounds memory section.
Diffstat:
M arg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/arg.h b/arg.h
@@ -6,8 +6,8 @@
extern char *argv0;
#define ARGBEGIN for(argv0 = *argv, argv++, argc--;\
- argv[0] && argv[0][1]\
- && argv[0][0] == '-';\
+ argv[0] && argv[0][0] == '-'\
+ && argv[0][1];\
argc--, argv++) {\
char _argc;\
char **_argv;\
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.