refactor: sprintf -> snprint, strncpy -> strlcpy
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ static void ioctl_error(VideoCapture *video_capture, const char *operation,
|
||||
static VideoCapture open_device(char *name) {
|
||||
VideoCapture video_capture;
|
||||
|
||||
strncpy(video_capture.name, name, STR_LEN);
|
||||
strlcpy(video_capture.name, name, STR_LEN);
|
||||
video_capture.error = false;
|
||||
video_capture.fd = -1;
|
||||
video_capture.exp_fd = -1;
|
||||
|
||||
Reference in New Issue
Block a user