Skip to content

Conversation

@yossizap
Copy link
Contributor

@yossizap yossizap commented Nov 28, 2019

opt->sz is initialized with r_buf_size at r_bin_open_io using an io buffer if r_bin_open_io can't open a file buffer. Since the debuggers returned unsigned values on lseek(used by io buffers to determine size) to opt->sz which is signed, opt->sz would overflow and contain a negative value, causing r_bin_open_buf to fail.

Went ahead and modified SEEK_END values for all debuggers even though this should only affect remote debuggers. ST64_MAX should be enough.

Note: gdbserver worked before the changes if it was on the same machine, tested with gdbserver on a different machine and wingdb.

opt->sz is initialized with r_buf_size at r_bin_open_io using an io
buffer if r_bin_open_io can't open a file buffer. Since the debuggers
returned unsigned values to opt->sz which is signed, opt->sz would
overflow and contain a negative value, causing r_bin_open_buf to fail.
Went ahead and modified CUR_END values for all debuggers even though this
should only affect remote debuggers. ST64_MAX should be enough.
@github-actions github-actions bot added the RIO label Nov 28, 2019
@XVilka
Copy link
Contributor

XVilka commented Nov 29, 2019

CI failure seems unrelated:

[XX] db/cmd/cmd_task & + grep  31
$ r2 -escr.utf8=0 -escr.color=0 -escr.interactive=0 -N -Q -i /var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-32846uJMeQc9Zk6tv -
"& ?e Hello\nfrom\na task!~task"
&& 1
&= 1
+Hello
+from
 a task!
+Hello
+from
+a task!
EXPECT=<<EOF
Hello
from
a task!
Hello
from
a task!

@radare
Copy link
Collaborator

radare commented Nov 29, 2019

this broken test is probably related to not being rebased

@radare radare merged commit e0b1977 into radareorg:master Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gdb Remote GDB protocol support RIO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants