Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

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

Open
ytrezq wants to merge 3 commits into
Exim:masterfrom
ytrezq:various-fixes
Open

Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls+other fixes#45
ytrezq wants to merge 3 commits into
Exim:masterfrom
ytrezq:various-fixes

Conversation

@ytrezq

@ytrezqytrezq commented May 30, 2016

Copy link
Copy Markdown

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()

@ytrezqytrezq changed the title Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc callsAdditonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() callsMay 30, 2016
@ytrezqytrezq changed the title Additonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() callsAdditonal safeguard for the ʟᴘ64 memory model : prefer size_t over int when appropriate+check all malloc() calls+other fixesMay 31, 2016
@ytrezqytrezq closed this Jun 25, 2016
@ytrezqytrezq reopened this Jun 25, 2016
ytrezq added 3 commits June 26, 2016 06:31
…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 freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@ytrezq