Merge pull request #1384 from N-R-K/fix_sizeof

fix incorrect usage of sizeof
This commit is contained in:
Arun 2022-06-02 21:44:52 +05:30 committed by GitHub
commit 46a5092eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2542,7 +2542,7 @@ static bool cpmv_rename(int choice, const char *path)
uint_t count = 0, lines = 0;
bool ret = FALSE;
char *cmd = (choice == 'c' ? cp : mv);
char buf[sizeof(patterns[P_CPMVRNM]) + sizeof(cmd) + (PATH_MAX << 1)];
char buf[sizeof(patterns[P_CPMVRNM]) + (MAX(sizeof(cp), sizeof(mv))) + (PATH_MAX << 1)];
fd = create_tmp_file();
if (fd == -1)