Re: [PATCH] Add secure gethostname() wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/16/23 15:45, Blazej Kucman wrote:
> gethostname() func does not ensure null-terminated string
> if hostname is longer than buffer length.
> For security, a function s_gethostname() has been added
> to ensure that "\0" is added to the end of the buffer.
> Previously this had to be handled in each place
> of the gethostname() call.
> 
> Signed-off-by: Blazej Kucman <blazej.kucman@xxxxxxxxx>
> ---
>  Monitor.c   |  3 +--
>  lib.c       | 19 +++++++++++++++++++
>  mapfile.c   |  3 +--
>  mdadm.c     |  3 +--
>  mdadm.h     |  1 +
>  super-ddf.c |  3 +--
>  6 files changed, 24 insertions(+), 8 deletions(-)

Applied!

Thanks,
Jes





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux