Skip to content

Commit

Permalink
initalize cursor to zero while parsing maps
Browse files Browse the repository at this point in the history
  • Loading branch information
j-hc committed Jun 20, 2024
1 parent 4ac03a7 commit b742e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zygisk/jni/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class ZygiskDetach : public zygisk::ModuleBase {
char mapbuf[256], flags[8];
while (fgets(mapbuf, sizeof(mapbuf), fp)) {
unsigned int dev_major, dev_minor;
int cur;
int cur = 0;
sscanf(mapbuf, "%*s %s %*x %x:%x %lu %*s%n", flags, &dev_major, &dev_minor, inode, &cur);
#define libbinder "libbinder.so"
if (cur < (int)STR_LEN(libbinder)) continue;
Expand Down

0 comments on commit b742e95

Please sign in to comment.