Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-toybox: Commit

external/toybox


Commit MetaInfo

Revision892c602b10e745977ca161d06f1a90ac6dfc3728 (tree)
Time2016-05-23 09:09:57
AuthorSteve Kondik <steve@cyng...>
CommiterSteve Kondik

Log Message

toybox: Fix netstat crash

  • Avoid crash if link was null, seen when launching Radish

Change-Id: I18a845557caaaa5d725c00978c90fb5b836a7876

Change Summary

Incremental Difference

--- a/toys/pending/netstat.c
+++ b/toys/pending/netstat.c
@@ -375,6 +375,9 @@ static long ss_inode(char *link)
375375 {
376376 long inode = -1;
377377 //"link = socket:[12345]", get "12345" as inode.
378+ if (link == NULL)
379+ return -1;
380+
378381 if (!strncmp(link, "socket:[", sizeof("socket:[")-1)) {
379382 inode = get_strtou(link + sizeof("socket:[")-1, (char**)&link, 0);
380383 if (*link != ']') inode = -1;
Show on old repository browser