Re: [PATCH RFC v2 2/3] decoder: Add V4L2 stateless H.264 decoder driver
From: Zhentao Guo
Date: Mon Dec 15 2025 - 21:36:23 EST
在 2025/12/15 21:58, Nicolas Dufresne 写道:
Le lundi 15 décembre 2025 à 10:15 +0800, Zhentao Guo a écrit :Yes, I checked the function strscpy too. It will add the \0 if the parameter 'size' is proper. We will remove this step in our code.
在 2025/12/12 21:51, Nicolas Dufresne 写道:Indeed, I had miss-read, then you simply need to remove the code you added to
Hi,Yes, we use strscpy() for copying all the strings.
Le vendredi 12 décembre 2025 à 12:11 +0800, Zhentao Guo a écrit :
I have to correct myself, I meant to suggest strscpy(dst, src, size).strcpy() would be the preferred helper for this, no need to fill theOk, it should be more suitable to use strcpy.
leading
zero liek this, see include/linux/string.h
Passing
the size for safety seems important, and unlike strncpy() it takes care of
the
leading zero.
force the last byte to be 0, this is not needed with that function.
Nicolas
NicolasThanks
Zhentao