Skip to content

Issues with newer glibc (strlcpy related) and warnings in date handling in headers.c #21

@carnil

Description

@carnil

In Debian downstream was reported the following:

https://bugs.debian.org/1068782

which will cause libesmtp and reverse depending packages to be removed, being a
release critical bug. Michael Hudson-Doyle reported the following:

Package: libesmtp
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: [email protected]

Dear Maintainer,

Apologies for submitting this as only one report. libesmtp was failing
on Ubuntu on armhf only because although strlcpy is now in glibc, the
declaration is only found if _DEFAULT_SOURCE or _BSD_SOURCE is defined.

While looking at this I saw some scary warnings about the date handling
in headers.c which I fixed the easy bits of.

In Ubuntu, the attached patch was applied to achieve the following:

  * d/patches/time64: cast time_t values to long long before passing to
    *printf functions (code storing time_t values in void* variables will
    still break in 2038).
  * d/patches/default-source: define _DEFAULT_SOURCE to get access to
    prototype of strlcpy.


Thanks for considering the patch.

Cheers,
mwh

and attached a patch to the bugreport covering those:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1068782;filename=libesmtp_1.1.0-3.1ubuntu1.debdiff;msg=5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions