Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls+other fixes #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ytrezq
Copy link

@ytrezq ytrezq commented May 30, 2016

I took care to not use size_t when the signing bit might be required (at least if I didn’t mistake).

This adds an additional (but probably unnecessary) safeguard. As well fix probable issues for 16 bits x86 machines (in the case they use an ᴏꜱ already supported by exim) .
At least this doesn’t hurt (until all return values ofmalloc()are checked which is something I fixed too).

Only core lib functions and the variables that use them are covered by this change (definitely unnecessary for the others). But I can add them too.

If despite testing I did something wrong, _please notice me_ of course.

This version leaves code that let the exim daemon continue running while still handling allocation errors.
I also replaced direct calls tofree()withstore_free()

@ytrezq ytrezq changed the title Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc calls Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls May 30, 2016
@ytrezq ytrezq changed the title Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls+other fixes May 31, 2016
@ytrezq ytrezq closed this Jun 25, 2016
@ytrezq ytrezq reopened this Jun 25, 2016
…prensenting length in core functions instead of signed int in order to prevent possibly existing overflows for crafted requests. This should also fix buffer overflows in the case someone run that software on a 16 bit x86 with an already supported ᴏꜱ.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant