[CRIU] [PATCH] bfd: timerfd -- Fix parsing typo
Andrew Vagin
avagin at parallels.com
Tue Sep 30 01:01:01 PDT 2014
Why do tests not catch this problem?
On Tue, Sep 30, 2014 at 11:41:36AM +0400, Cyrill Gorcunov wrote:
> While been converting reading of data stream
> to bfd the @buf member was left untouched leading
> to incorrect data to be read, fix it setting up
> proper one, ie @str itself, otherwise dumping
> of timerfd files are failing.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> proc_parse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/proc_parse.c b/proc_parse.c
> index 40c30228f711..d63d67755249 100644
> --- a/proc_parse.c
> +++ b/proc_parse.c
> @@ -1102,7 +1102,7 @@ static int parse_timerfd(struct bfd *f, char *str, TimerfdEntry *tfy)
> * it_value: (0, 49406829)
> * it_interval: (1, 0)
> */
> - if (sscanf(buf, "clockid: %d", &tfy->clockid) != 1)
> + if (sscanf(str, "clockid: %d", &tfy->clockid) != 1)
> goto parse_err;
>
> str = breadline(f);
> --
> 1.9.3
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list