<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/ui, branch libressl-v3.4.1</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.4.1</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.4.1'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2020-09-25T11:25:31+00:00</updated>
<entry>
<title>KNF for a few comments and indent a label</title>
<updated>2020-09-25T11:25:31+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T11:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=595cb14b635063eb152a7a571795b041671c0869'/>
<id>urn:sha1:595cb14b635063eb152a7a571795b041671c0869</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove some dangling elses for consistency with the rest of the file</title>
<updated>2020-09-25T11:17:52+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T11:17:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1efcbc50096abcd1a19ce4d45d4d127e06e04413'/>
<id>urn:sha1:1efcbc50096abcd1a19ce4d45d4d127e06e04413</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify UI_new_method()</title>
<updated>2020-09-25T11:05:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T11:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=66d1ad87ddaa338c343987d00bcc03cf1d438b4a'/>
<id>urn:sha1:66d1ad87ddaa338c343987d00bcc03cf1d438b4a</id>
<content type='text'>
Use calloc() instead of malloc() and setting all members manually to 0.
Avoid unnecessary else branch.
</content>
</entry>
<entry>
<title>Move variable declaration to the top of UI_set_result and ditch</title>
<updated>2020-09-25T10:56:36+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T10:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1b9a5c6ef789bd22c50707defa5b78bfdc8d6fec'/>
<id>urn:sha1:1b9a5c6ef789bd22c50707defa5b78bfdc8d6fec</id>
<content type='text'>
a pointless local scope.

suggested by jsing
</content>
</entry>
<entry>
<title>The default branch of a switch somehow got moved inside of a pointless</title>
<updated>2020-09-25T10:50:26+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T10:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b0df497f3e068a862fde134eaf345ace1b76bb36'/>
<id>urn:sha1:b0df497f3e068a862fde134eaf345ace1b76bb36</id>
<content type='text'>
local scope of a case branch. Move it into the proper location.

No binary change on amd64.

"sure" jsing
</content>
</entry>
<entry>
<title>Simplify call to ERR_print_errors_cb()</title>
<updated>2020-09-25T10:46:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-25T10:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e7ab003bf6d776e3b7e60d930414a50a6375989b'/>
<id>urn:sha1:e7ab003bf6d776e3b7e60d930414a50a6375989b</id>
<content type='text'>
There is no reason for print_error()'s third argument to be a UI *.
It may just as well be a void * to match what ERR_print_errors_cb()
expects. This avoids casting the function pointer. Also, there's no
need for a (void *) cast.

ok jsing
</content>
</entry>
<entry>
<title>Error out if ok_chars and cancel_chars overlap</title>
<updated>2020-09-24T19:31:01+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-24T19:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8e6f5d2de87e242ec34905337776aedd71040240'/>
<id>urn:sha1:8e6f5d2de87e242ec34905337776aedd71040240</id>
<content type='text'>
It is a bit silly to push an error on the stack without erroring out,
so error out if the ok_chars and cancel_chars overlap.

ok jsing
</content>
</entry>
<entry>
<title>Fix a number of leaks in the UI_dup_* functions</title>
<updated>2020-09-24T19:29:09+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-24T19:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=601e8c398115dd6a33daa6e87d334dc0624b0b6e'/>
<id>urn:sha1:601e8c398115dd6a33daa6e87d334dc0624b0b6e</id>
<content type='text'>
If any of general_allocate_{prompt,string,boolean}() fail, the
UI_dup_* functions may leak the strings they strduped beforehand.
Instead, use strdup inside these functions, so we can free as
necessary.  This makes the UI_add_* and UI_dup_* simple wrappers
around general_allocate_{string,boolean}() that differ only in
passing a Boolean that indicates whether or not to use strdup.

Make a general cleanup pass over these functions, simplify the
logic and make it overall a bit easier to follow.  While there,
use strcspn() instead of a handrolled variant.

The only changes in behavior are that ERR_R_MALLOC_FAILURE is now
pushed onto the stack a bit more often and that UI_dup_input_string()
now returns -1 on failure to dup prompt like all the other UI_dup_*
functions.  This is not a problem since the manual already documents
that errors are signaled with &lt;= 0. The only consumer of this function
according to Debian's codesearch is libp11, I sent them a PR to fix
their (already broken) error handling.

Addresses about 10 errors thrown by the LLVM static analyzer in ui/.

ok jsing
</content>
</entry>
<entry>
<title>Push ERR_R_MALLOC_FAILURE onto the error stack</title>
<updated>2020-09-24T19:24:45+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-24T19:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=28f9589656367e65d19640878dfcca8e6601c20e'/>
<id>urn:sha1:28f9589656367e65d19640878dfcca8e6601c20e</id>
<content type='text'>
If sk_UI_STRING_new_null() fails, this must be due to a memory error,
so signal this to the user.

ok jsing
</content>
</entry>
<entry>
<title>Make free_strings() NULL safe</title>
<updated>2020-09-24T19:22:18+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-09-24T19:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=52f9aecae4f1ab60ff1ec122577f0553c71ff6d8'/>
<id>urn:sha1:52f9aecae4f1ab60ff1ec122577f0553c71ff6d8</id>
<content type='text'>
ok jsing
</content>
</entry>
</feed>
