

#include <string.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>

#include "testutil.h"


#if defined(__has_feature)
# if __has_feature(address_sanitizer)
#  define __SANITIZE_ADDRESS__ 1
# endif
#endif



#if !defined(__SANITIZE_ADDRESS__) || defined(_MSC_VER)
# undef __SANITIZE_ADDRESS__
# define __SANITIZE_ADDRESS__ 0
#endif



int main(int argc, char *argv[])
{
#if __SANITIZE_ADDRESS__
    int exitcode = EXIT_SUCCESS;
#else
    
    int exitcode = EXIT_FAILURE;
#endif
    char *lost;

    lost = OPENSSL_malloc(3);
    if (!TEST_ptr(lost))
        return EXIT_FAILURE;

    strcpy(lost, "ab");

    if (argv[1] && strcmp(argv[1], "freeit") == 0) {
        OPENSSL_free(lost);
        exitcode = EXIT_SUCCESS;
    }

    lost = NULL;
    return exitcode;
}
