Skip to content

Commit

Permalink
fix: delete_dir snprintf bug (#1400)
Browse files Browse the repository at this point in the history
* delete_dir snprintf bug

* no hardcode
  • Loading branch information
wanghenshui authored Apr 24, 2023
1 parent 0351bb6 commit cf5dcda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ int delete_dir(const char* dirname) {
if (0 == ret) {
continue;
}
snprintf(chBuf, sizeof(256), "%s/%s", dirname, ptr->d_name);
snprintf(chBuf, sizeof(chBuf), "%s/%s", dirname, ptr->d_name);
ret = is_dir(chBuf);
if (0 == ret) {
// is dir
Expand Down

0 comments on commit cf5dcda

Please sign in to comment.