Skip to content

Parsing cookie that overflow long return wrong value #165

Description

@Tesseract22

When a fiobj is of type FIOBJ_T_NUMBER, and it contains a number that overflows long (i64) such as 13725369883134782382, fiobj_obj2num returns the maximum of i64 which is 9223372036854775807.

This occurs to me while using zap, where I am using a unsigned long u64 number in a cookie. I was scratching my head thinking why do session cookie validation only works 50% of the time, turns out it is a classic integer overflow bug. When I switched to i64 for the cookie the bug immediately disappeared.

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