Skip to content
Snippets Groups Projects
Commit 33bd6650 authored by Saleh Ahmed Khan's avatar Saleh Ahmed Khan
Browse files

strncpy -> strcpy

parent fd081b11
Branches
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ void parse(char* req, char* root) { ...@@ -25,7 +25,7 @@ void parse(char* req, char* root) {
// printf("root %s\n", root); // printf("root %s\n", root);
// printf("path %s\n", path); // printf("path %s\n", path);
char full_path[sizeof(path) + sizeof(root)]; char full_path[sizeof(path) + sizeof(root)];
strncpy(full_path, root, sizeof(root)); strcpy(full_path, root);
strcat(full_path, path); strcat(full_path, path);
// full_path[sizeof(full_path)-1] = 9; // full_path[sizeof(full_path)-1] = 9;
printf("waiittt %s end\n", full_path); printf("waiittt %s end\n", full_path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment