Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util: use strnlen() in strndup() implementations | Samuel Iglesias Gonsalvez | 2015-09-30 | 1 | -4/+1 |
| | | | | | | | | | If the string being copied is not NULL-terminated the result of strlen() is undefined. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Neil Roberts <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> | ||||
* | util: Fix strndup prototype on C++. | Jose Fonseca | 2015-09-29 | 1 | -0/+1 |
| | | | | Trivial. | ||||
* | util: implement strndup for WIN32 | Samuel Iglesias Gonsalvez | 2015-09-29 | 1 | -0/+49 |
v2: - Add strndup.h to Makefile.sources (Emil) - Use calloc instead of malloc (Emil). - Check if allocation fails (Emil, Jose) - Add '#pragma once' and include stdlib.h to strndup.h (Jose) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 Reviewed-by: Jose Fonseca <[email protected]> |