bug-bash
[Top][All Lists]
Advanced

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

Re: Bugfix: builtins/history: Check return value from localtime


From: Chet Ramey
Subject: Re: Bugfix: builtins/history: Check return value from localtime
Date: Mon, 22 Jan 2018 09:50:51 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 1/19/18 11:06 PM, Luke Dashjr wrote:
> Somehow some of my bash histories have acquired very large timestamps (eg,
> "#143513214935906531") that cause localtime to fail. BASH's history builtin
> currently crashes when it encounters this, because it passes the return
> value from localtime directly into strftime, resulting in a NULL pointer
> dereference.

Thanks for the report and patch.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]