mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 15:53:26 +01:00
Fix partial fix: A slash in pos 0 still led to read access to pathname[-1].
This commit is contained in:
parent
8ff907d719
commit
4f4a379a01
@ -114,7 +114,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil
|
||||
ChatContext *ctx = self->chatwin;
|
||||
|
||||
int idx = strlen(pathname) - 1;
|
||||
while (pathname[idx] == '/' && idx >= 0) {
|
||||
while (idx >= 0 && pathname[idx] == '/') {
|
||||
pathname[idx--] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user