diff options
author | Nicholas Tay <nick@windblume.net> | 2022-01-14 00:15:48 +1100 |
---|---|---|
committer | Nicholas Tay <nick@windblume.net> | 2022-01-14 00:15:48 +1100 |
commit | 0ae79b0b8122b99aed41c5557b2c2ce57c03b0f6 (patch) | |
tree | 4eee6c4d464112970946947171e8a4486096e1cc | |
parent | 0f1bc3f8788bdbad88840cbbffc6d4787629c24e (diff) | |
download | passgen-0ae79b0b8122b99aed41c5557b2c2ce57c03b0f6.tar.gz passgen-0ae79b0b8122b99aed41c5557b2c2ce57c03b0f6.tar.bz2 passgen-0ae79b0b8122b99aed41c5557b2c2ce57c03b0f6.zip |
Fix direct grammar string passing invalid free
-rw-r--r-- | passgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -213,7 +213,8 @@ cleanup: #ifdef USE_WINCRYPT CryptReleaseContext(win_rng, 0); #endif - if (grammar != grammar_buf) + /* TODO: this && kinda sucks, would like a better but still fast way */ + if (grammar != grammar_buf && grammar != argv[1]) free(grammar); if (password != password_buf) free(password); |