Patch for cmd.c
- From: "Andrew V. Samoilov" <andrew email zp ua>
- To: mc-devel gnome org
- Subject: Patch for cmd.c
- Date: Fri, 22 Oct 2004 22:30:23 +0300 (EEST)
Hi,
this patch fixes rare and almost impossible off-by-one.
If user input is empty (""), these lines can do very bad thing:
if (reg_exp_t [strlen(reg_exp_t) - 1] == PATH_SEP){
dirflag = 1;
reg_exp_t [strlen(reg_exp_t) - 1] = 0;
}
It is almoust impossible to meet PATH_SEP before '\0', but sometimes it happens.
--
Regards,
Andrew V. Samoilov.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]