]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix strsep_quote() on strings without quotes.
authormav <mav@FreeBSD.org>
Tue, 25 Jun 2019 17:00:53 +0000 (17:00 +0000)
committermav <mav@FreeBSD.org>
Tue, 25 Jun 2019 17:00:53 +0000 (17:00 +0000)
commit1669b0172026b0a978378800ea193ff8868cf117
tree94b7858fccd4b7c3d6856e852f2b2615c0cb1c10
parent7b8f3fdc3eb47e03b41c5486354b03bf1b8447d6
Fix strsep_quote() on strings without quotes.

For strings without quotes and escapes dstptr and srcptr are equal, so
zeroing *dstptr before checking *srcptr is not a good idea.  In practice
it means that in -maproot=65534:65533 everything after the colon is lost.

The problem was there since r293305, but before r346976 it was covered by
improper strsep_quote() usage.

PR: 238725
MFC after: 3 days
Sponsored by: iXsystems, Inc.
usr.sbin/mountd/mountd.c