Staging
v0.5.1
https://github.com/python/cpython
Revision 549e55a3086d04c13da9b6f33214f6399681292a authored by Zackery Spytz on 01 June 2019, 00:16:20 UTC, committed by Berker Peksag on 01 June 2019, 00:16:20 UTC
1 parent ed9f356
Raw File
Tip revision: 549e55a3086d04c13da9b6f33214f6399681292a authored by Zackery Spytz on 01 June 2019, 00:16:20 UTC
bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711)
Tip revision: 549e55a
strdup.c
/* strdup() replacement (from stdwin, if you must know) */

char *
strdup(const char *str)
{
    if (str != NULL) {
        char *copy = malloc(strlen(str) + 1);
        if (copy != NULL)
            return strcpy(copy, str);
    }
    return NULL;
}
back to top