We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67394c6 + fa0ecd3 commit 815bd14Copy full SHA for 815bd14
su.c
@@ -318,7 +318,8 @@ int main(int argc, char *argv[])
318
}
319
} else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--shell")) {
320
if (++i < argc) {
321
- strcpy(shell, argv[i]);
+ strncpy(shell, argv[i], sizeof(shell));
322
+ shell[sizeof(shell) - 1] = 0;
323
} else {
324
usage();
325
@@ -395,6 +396,7 @@ int main(int argc, char *argv[])
395
396
// Close the database, we're done with it. If it stays open,
397
// it will cause problems
398
sqlite3_close(db);
399
+ db = NULL;
400
LOGE("sudb - Database closed");
401
402
0 commit comments