ilyakurdyukov / spreadtrum_flash

Spreadtrum firmware dumper for Linux
102 stars 33 forks source link

Attempt to fix issue and remove unnecessary CFLAGS #5

Closed CE1CECL closed 1 year ago

CE1CECL commented 1 year ago

https://github.com/TomKing062/CVE-2022-38694_unlock_bootloader/issues/25

ilyakurdyukov commented 1 year ago

Which issue? Your patch is ridiculously wrong in every way.

-CFLAGS = -O2 -Wall -Wextra -std=c99 -pedantic -Wno-unused
+CFLAGS = -std=c99

-O2 is unnecessary? Warnings is unnecessary?

-   if (!ret) ERR_EXIT("timeout reached\n");
+   while (!ret);

Will create an infinite loop if the device is not responding. And you won't see a warning about this. This usually happens when you unplug the device, but it can happen due to a bad cable connection.

You don't fix anything when you hide warnings.