[PATCH RFC v2 2/3] decoder: Add V4L2 stateless H.264 decoder driver

Nicolas Dufresne nicolas at ndufresne.ca
Mon Dec 15 05:58:31 PST 2025


Le lundi 15 décembre 2025 à 10:15 +0800, Zhentao Guo a écrit :
> 
> 在 2025/12/12 21:51, Nicolas Dufresne 写道:
> > Hi,
> > 
> > Le vendredi 12 décembre 2025 à 12:11 +0800, Zhentao Guo a écrit :
> > > > strcpy() would be the preferred helper for this, no need to fill the
> > > > leading
> > > > zero liek this, see include/linux/string.h
> > > Ok, it should be more suitable to use strcpy.
> > I have to correct myself, I meant to suggest strscpy(dst, src, size).
> > Passing
> > the size for safety seems important, and unlike strncpy() it takes care of
> > the
> > leading zero.
> Yes, we use strscpy() for copying all the strings.

Indeed, I had miss-read, then you simply need to remove the code you added to
force the last byte to be 0, this is not needed with that function.

Nicolas

> > 
> > Nicolas
> 
> Thanks
> 
> Zhentao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251215/7b101226/attachment-0001.sig>


More information about the linux-arm-kernel mailing list