mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 05:40:10 +00:00
fix divide by zero (#8100)
This commit is contained in:
parent
c7b3a1e2e7
commit
7b5de5cb51
@ -14,6 +14,8 @@ int handle_qSupported(libgdbr_t *g) {
|
||||
if (r_str_startswith (tok, "PacketSize=")) {
|
||||
// Largest packet size we support is 2048
|
||||
g->stub_features.pkt_sz = R_MIN (strtoul (tok + strlen ("PacketSize="), NULL, 16), 2048);
|
||||
// Shouldn't be smaller than 64 (Erroneous 0 etc.)
|
||||
g->stub_features.pkt_sz = R_MAX (g->stub_features.pkt_sz, 64);
|
||||
} else if (r_str_startswith (tok, "qXfer:")) {
|
||||
if (!tok[6]) {
|
||||
tok = strtok (NULL, ";");
|
||||
|
Loading…
Reference in New Issue
Block a user