mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 21:44:20 +01:00
Fix adb get-serialno error handling
If pipe read fails, return.
This commit is contained in:
@@ -304,6 +304,10 @@ adb_get_serialno(struct sc_intr *intr) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (r == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sc_str_truncate(buf, r, " \r\n");
|
||||
|
||||
return strdup(buf);
|
||||
|
||||
Reference in New Issue
Block a user