Translate

Samstag, 6. Januar 2018

QUANTUM RANDOMNESS-Quantum random generator HU Berlin

https://qrng.physik.hu-berlin.de/

https://qrng.physik.hu-berlin.de/download

Username: safasdfgwadgva3z5eh
Email: safasdfgwadgva3z5eh@tempr.email
Full Name: Hans Meier
Password: TcQgUrBj1BeF

C Sanitize user input from buffer overflows/ Prevent buffer overflows in C

#include <string.h>
#include <stdio.h>

int main(int argc, char *argv[]){
    char *buff = (char *)malloc(strlen(argv[1])+1);
    if (buff != NULL) {
        strcpy(buff, argv[1]);
        printf("argv[1] = %s.\n", buff);
    }
    else {
        /* Couldn't get the memory - recover */
    }
    return 0;
}