[apparmor] [PATCH 2/2] parser: Don't write the stream's address to the rule buffer
John Johansen
john.johansen at canonical.com
Fri Aug 29 22:11:12 UTC 2014
On 08/27/2014 04:09 PM, Seth Arnold wrote:
> On Wed, Aug 27, 2014 at 05:01:46PM -0500, Tyler Hicks wrote:
>> The writeu16() function was returning the address of the passed in
>> std::ostringstream and then the callers of that function were
>> incorrectly writing that address to the rule buffer.
>>
>> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
>
> Acked-by: Seth Arnold <seth.arnold at canonical.com>
>
> (Sigh, I even wondered if the "return o" was correct and chalked it up to
> crazy C++ being crazy.)
>
in fact when its done right that is correct C++
you return a reference back to the stream so you can chain the <<
blah << foo << bar;
this case was just not doing it right
More information about the AppArmor
mailing list