simuvex icon indicating copy to clipboard operation
simuvex copied to clipboard

gets() missing?

Open moshekaplan opened this issue 9 years ago • 2 comments

I was looking through the list of functions listed at https://github.com/angr/simuvex/tree/master/simuvex/procedures/libc___so___6 and it seems the gets() function is missing. Could it be implemented and added?

moshekaplan avatar Nov 22 '16 03:11 moshekaplan

gets has gone unimplemented so long because it's impossible to simulate its effects precisely - we'd have to touch 100% of memory after the pointer. Recently, there have been explicit limit variables in the libc plugin which would allow the user to control exactly how much memory becomes symbolic, though, so it's feasible now.

rhelmot avatar Nov 22 '16 03:11 rhelmot

Would it be possible to implement gets() the same way scanf() using a format string of "%s" operates, with the only difference being that gets() wouldn't stop if it hit whitespace?

moshekaplan avatar Nov 22 '16 20:11 moshekaplan