[Kde-pim] Review Request 127299: Safe wrapper around gpgmepp_strerror_r

Jan Kundrát jkt at kde.org
Mon Mar 7 12:24:17 GMT 2016



> On March 7, 2016, 9:23 a.m., Andre Heinecke wrote:
> > Thanks. Looks good to me. I'm not sure if this needed it's own header or if it wouldn't have been better placed in util.h as inline function.
> > But I'm not against it as we don't install the new header / make it public api.

I've changed this to follow the existing pattern of inline functions, then -- IMHO it's always good to follow a project's existing style.


- Jan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127299/#review93247
-----------------------------------------------------------


On March 6, 2016, 11:27 p.m., Jan Kundrát wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127299/
> -----------------------------------------------------------
> 
> (Updated March 6, 2016, 11:27 p.m.)
> 
> 
> Review request for KDEPIM-Libraries, Andre Heinecke, Laurent Montel, and Marc Mutz.
> 
> 
> Repository: gpgmepp
> 
> 
> Description
> -------
> 
> The GpgME provides two functions, gpgme_strerror which is not thread
> safe, and gpgme_strerror_r which is reentrant, but requires the caller
> to provide preallocated memory. Their use in GpgME++ was not consistent,
> and neither was the size of the used memory buffer or its sanitization
> concerning the trailing null byte.
> 
> This is a C++ library, so let's use C++ facilities for this. At the same
> time, C++11 is not required and therefore std::string::reserve is not
> usable (strings might use segmented memory prior to C++11).
> 
> 
> Diffs
> -----
> 
>   autotests/installtest.cpp 23c3b772496ec656f363e5bcc96c00414846173e 
>   src/CMakeLists.txt 1c3335a5d2b006b5a7b6271bf83583b5548ff004 
>   src/context.cpp ab633d7a07fc4bed7c3603f529cc9d1587557e12 
>   src/editinteractor.cpp 0c5f778376326c77078e87fdc2ff55682af4d84b 
>   src/exception.cpp c687024bbc0194d744c12794a8bededa7b4fd120 
>   src/gpgmepp_strerror.h PRE-CREATION 
>   src/gpgmepp_strerror.cpp PRE-CREATION 
>   src/key.cpp 5eadbdd238012258f92f90fee7cafc6afa7f4427 
> 
> Diff: https://git.reviewboard.kde.org/r/127299/diff/
> 
> 
> Testing
> -------
> 
> It builds. There are no tests because all autotests are commented out, so...
> 
> 
> Thanks,
> 
> Jan Kundrát
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list