<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plan9port/src/libsec/port/x509.c, branch patch</title>
<subtitle>Plan 9 from User Space (with patches)</subtitle>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/'/>
<entry>
<title>Trivial changes: whitespace and modes.</title>
<updated>2020-01-10T14:54:30+00:00</updated>
<author>
<name>Dan Cross</name>
<email>cross@gajendra.net</email>
</author>
<published>2020-01-10T14:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=fa325e9b42b0bdfb48857d1958d9fb7ceac55151'/>
<id>fa325e9b42b0bdfb48857d1958d9fb7ceac55151</id>
<content type='text'>
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 &lt;cross@gajendra.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;cross@gajendra.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libsec: avoid undefined C</title>
<updated>2013-03-19T18:35:16+00:00</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2013-03-19T18:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=8a2a5b8f2568a665f00741994c1247f0f7d3dffe'/>
<id>8a2a5b8f2568a665f00741994c1247f0f7d3dffe</id>
<content type='text'>
gcc compiles `p + length &lt; p' into 'length &lt; 0' since pointer overflow is undefined behavior in C.  This breaks the check against a large `length'.

Use `length &gt; pend - p' instead.

There's no need to check `length &lt; 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 &lt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc compiles `p + length &lt; p' into 'length &lt; 0' since pointer overflow is undefined behavior in C.  This breaks the check against a large `length'.

Use `length &gt; pend - p' instead.

There's no need to check `length &lt; 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 &lt; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Use gcc -ansi -pedantic in 9c.  Fix many non-C89-isms.</title>
<updated>2006-04-01T19:24:03+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2006-04-01T19:24:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=cbeb0b26e4c7caa8d1b47de791a7418dc20a4567'/>
<id>cbeb0b26e4c7caa8d1b47de791a7418dc20a4567</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add dsa x509</title>
<updated>2005-02-13T18:35:11+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2005-02-13T18:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=74fc94d47e68684567f16d3d09b822cdad721e4a'/>
<id>74fc94d47e68684567f16d3d09b822cdad721e4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>changes from plan 9.  some clean-up.</title>
<updated>2004-12-26T23:59:10+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2004-12-26T23:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=1b1434ebcebd9411b0ad3815bc5eb9237a1a8b23'/>
<id>1b1434ebcebd9411b0ad3815bc5eb9237a1a8b23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SunOS can rot in hell.</title>
<updated>2004-03-26T01:59:35+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2004-03-26T01:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=be22ae2d0729f68672e3202c91cfe13c9e74cccc'/>
<id>be22ae2d0729f68672e3202c91cfe13c9e74cccc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add most of libsec.</title>
<updated>2004-03-21T14:04:56+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2004-03-21T14:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=0fc65b37a1e7585ca2347bf61dcb8bc3a6b146a4'/>
<id>0fc65b37a1e7585ca2347bf61dcb8bc3a6b146a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
