oss-sec mailing list archives

Re: [patch] proc.5: tell how to parse /proc/*/stat correctly


From: Steffen Nurpmeso <steffen () sdaoden eu>
Date: Thu, 29 Dec 2022 21:43:00 +0100

Jeffrey Walton wrote in
 <CAH8yC8=p9a71AohbLtKGzb8d8yzBYyCADUJ1xthddQsyFbdSRA () mail gmail com>:
 ...
 |Using \0 as the delimiter would still require encoding of \0 when it
 |is present in the data.

But it is already used in some files like /proc/self/environ. 
'Just thinking, it would be the (here optional) .nul suffix that
is new.  (It of course cannot happen in the C-style strings of
which all this is about.  For serialization of true non-humanized
binary data "as-is", yes.  I surely would go CBOR then.  Though
the libcbor that i track is a huge beast, it surely can be much
smaller than that.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Current thread: