aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntony Kellermann2018-08-23 17:21:47 -0400
committerAntony Kellermann2018-08-23 17:21:47 -0400
commitac0178748513f9c5b98a5aabbfda748ff4ca810d (patch)
tree0d06f5011403cd26a83b3af2b89f4c8f5741bd06
parent5b9f5d991a546ae3533fc9cb68f373d400cfe5cf (diff)
downloadaur-ac0178748513f9c5b98a5aabbfda748ff4ca810d.tar.gz
Fixed wrong password segfault
-rw-r--r--portfolio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/portfolio.c b/portfolio.c
index 3d516bd4617c..83ad3f7987bd 100644
--- a/portfolio.c
+++ b/portfolio.c
@@ -39,6 +39,8 @@ void portfolio_modify_write(const char* symbol, double quantity_shares, double u
char* password = NULL; // Store password for re-encryption
String* pString = portfolio_ncurses_get_plaintext_string(&password);
+ if (pString == NULL) // Decryption error
+ return;
// Perform modification
portfolio_modify_string(pString, symbol, quantity_shares, usd_spent, mod_option);