Skip to content

Commit

Permalink
kptools strlcpy -> strncpy
Browse files Browse the repository at this point in the history
  • Loading branch information
bmax committed Nov 22, 2023
1 parent 9c6d7e3 commit 6ebbab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/kptools.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ int patch_image()
memset(config, 0, sizeof(patch_config_t));
// todo:
#ifdef ANDROID
strlcpy(config->config_ini_path, "/data/adb/kernelpatch/kpinit.ini", sizeof(config->config_ini_path));
strncpy(config->config_ini_path, "/data/adb/kernelpatch/kpinit.ini", sizeof(config->config_ini_path) - 1);
#else
strlcpy(config->config_ini_path, "/etc/kernelpatch/kpinit.ini", sizeof(config->config_ini_path));
strncpy(config->config_ini_path, "/etc/kernelpatch/kpinit.ini", sizeof(config->config_ini_path) - 1);
#endif
preset->kernel_size = kinfo.kernel_size;
preset->start_offset = align_kernel_size;
Expand Down

0 comments on commit 6ebbab2

Please sign in to comment.