Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 114dc46
  • /
  • fuzz
  • /
  • rand.inc
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:d0eebff896c2d2d9b781978f87f79a699dc638c0
directory badge Iframe embedding
swh:1:dir:9309c80707afc4b83acba4f119213038fd629a49
rand.inc
/*
 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the Apache License 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://www.openssl.org/source/license.html
 * or in the file LICENSE in the source distribution.
 */
#include <openssl/rand.h>

static int fuzz_bytes(unsigned char *buf, int num)
{
    unsigned char val = 1;

    while (--num >= 0)
        *buf++ = val++;
    return 1;
}

static int fuzz_status(void)
{
    return 1;
}

static RAND_METHOD fuzz_rand_method = {
    NULL,
    fuzz_bytes,
    NULL,
    NULL,
    fuzz_bytes,
    fuzz_status
};

void FuzzerSetRand(void)
{
    RAND_set_rand_method(&fuzz_rand_method);
}


ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top