aboutsummaryrefslogtreecommitdiffstats
path: root/zahl/inlines.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix out of bounds read in zlsb()Valentina Demiciseaux4 days1-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | prev scales i from num chars -> num bits, then indexes with it, causing a page fault or reading garbage. scale i after the read instead. here is a reproducer #include <stdio.h> #include "libzahl/zahl.h" int main(void) { z_t x; zinit(x); zsetu(x, 1); zlsh(x, x, 2097153); printf("used chars: expect 32769, have %lu\n", x->used); size_t tz = zlsb(x); printf("tz: expect 2097153, have %lu\n", tz); }
* Some small improvementsMattias Andrée2016-05-071-1/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* OptimisationsMattias Andrée2016-05-071-3/+7
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Make zdiv and zmod (calls zdivmod) inlineMattias Andrée2016-05-061-0/+14
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Make zmul and zsqr (calls low-level functions) inlineMattias Andrée2016-05-061-0/+25
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Do not use explicit optimisation level on zsaveMattias Andrée2016-05-061-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Rename zahl-{inlines,internals}.h => zahl/{inlines,internals}.hMattias Andrée2016-05-051-0/+268
Signed-off-by: Mattias Andrée <maandree@kth.se>