Commits
- Commit:
fa325e9b42b0bdfb48857d1958d9fb7ceac55151
- From:
- Dan Cross <cross@gajendra.net>
- Date:
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.
Signed-off-by: Dan Cross <cross@gajendra.net>
- Commit:
8a2a5b8f2568a665f00741994c1247f0f7d3dffe
- From:
- Xi Wang <xi.wang@gmail.com>
- Via:
- Russ Cox <rsc@swtch.com>
- Date:
libsec: avoid undefined C
gcc compiles `p + length < p' into 'length < 0' since pointer overflow is undefined behavior in C. This breaks the check against a large `length'.
Use `length > pend - p' instead.
There's no need to check `length < 0' since `length' is from length_decode() and should be non-negative.
===
Try the simplified code.
void bar(void);
void foo(unsigned char *p, int length)
{
if (p + length < p)
bar();
}
$ gcc -S -o - t.c -O2
...
foo:
.LFB0:
.cfi_startproc
testl %esi, %esi
js .L4
rep
ret
.L4:
jmp bar
.cfi_endproc
Clearly `p' is not used at all.
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7231069
- Commit:
cbeb0b26e4c7caa8d1b47de791a7418dc20a4567
- From:
- rsc <devnull@localhost>
- Date:
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
- Commit:
74fc94d47e68684567f16d3d09b822cdad721e4a
- From:
- rsc <devnull@localhost>
- Date:
add dsa x509
- Commit:
1b1434ebcebd9411b0ad3815bc5eb9237a1a8b23
- From:
- rsc <devnull@localhost>
- Date:
changes from plan 9. some clean-up.
- Commit:
be22ae2d0729f68672e3202c91cfe13c9e74cccc
- From:
- rsc <devnull@localhost>
- Date:
SunOS can rot in hell.
- Commit:
0fc65b37a1e7585ca2347bf61dcb8bc3a6b146a4
- From:
- rsc <devnull@localhost>
- Date:
Add most of libsec.