1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Bugfix OX rpad generation

________________________________________
< No comment - should be much better now >
 ----------------------------------------
 \
  \
   \ >()_
      (__)__ _
This commit is contained in:
Stefan Kropp 2022-04-30 22:10:21 +02:00 committed by Michael Vetter
parent 62018f48c5
commit c9e6a89aea

View File

@ -1616,11 +1616,13 @@ _openpgp_signcrypt(xmpp_ctx_t* ctx, const char* const to, const char* const text
struct tm* tm = localtime(&now);
char buf[255];
strftime(buf, sizeof(buf), "%FT%T%z", tm);
int randnr = rand() % 5;
char rpad_data[randnr];
for (int i = 0; i < randnr - 1; i++) {
rpad_data[i] = 'c';
// build rpad
int randnr = (rand() % 100) + 1;
char rpad_data[randnr];
for (int i = 0; i < randnr; i++) {
int rchar = (rand() % 52) + 65;
rpad_data[i] = rchar;
}
rpad_data[randnr - 1] = '\0';