From 5bcc9d935b4066de931a8bb151abc36df0dc5168 Mon Sep 17 00:00:00 2001 From: mglocker Date: Thu, 22 Jul 2010 11:58:03 +0000 Subject: [PATCH] Replace strncat() with strlcat(). --- regress/sys/dev/video/videotest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress/sys/dev/video/videotest.c b/regress/sys/dev/video/videotest.c index 51e069fb985..f255f6def59 100644 --- a/regress/sys/dev/video/videotest.c +++ b/regress/sys/dev/video/videotest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: videotest.c,v 1.2 2010/07/22 11:55:26 mglocker Exp $ */ +/* $OpenBSD: videotest.c,v 1.3 2010/07/22 11:58:03 mglocker Exp $ */ /* * Copyright (c) 2010 Marcus Glocker @@ -399,7 +399,7 @@ test_capture(char *dev_name, char *dev_full, int access, int use_poll) /* insert dynamic huffmann table to mjpeg */ jpeg_insert_dht(buf, n1, img, &img_len); - strncat(filename, ".jpg", 4); + strlcat(filename, ".jpg", sizeof(filename)); break; case V4L2_PIX_FMT_YUYV: printf("Convertion for YUYV not supported!\n"); @@ -407,7 +407,7 @@ test_capture(char *dev_name, char *dev_full, int access, int use_poll) img_len = n1; memcpy(img, buf, img_len); - strncat(filename, ".raw", 4); + strlcat(filename, ".raw", sizeof(filename)); break; default: break; -- 2.20.1