]> git.ipfire.org Git - thirdparty/dracut.git/commit
Always check the return number of asprintf
authorKamil Rytarowski <n54@gmx.com>
Sat, 11 May 2013 12:40:19 +0000 (14:40 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 28 May 2013 12:35:54 +0000 (14:35 +0200)
commitd9eff33ce203a9010067a15ddf1d279132abf437
tree8faee021037e27dd98fe202238608d0f042dd9b2
parent8974102f6b4d59a29e01d080262cbbb0a08571d3
Always check the return number of asprintf

asprintf prints to an allocated string. When  successful,  the
functions return the number of bytes printed. If memory allocation
wasn't possible, or some other error occurs, the function will return
-1.

Don't check strp as a result of asprintf, it's content may be undefined.

man 3 asprintf
install/dracut-install.c