1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -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); struct tm* tm = localtime(&now);
char buf[255]; char buf[255];
strftime(buf, sizeof(buf), "%FT%T%z", tm); strftime(buf, sizeof(buf), "%FT%T%z", tm);
int randnr = rand() % 5;
char rpad_data[randnr];
for (int i = 0; i < randnr - 1; i++) { // build rpad
rpad_data[i] = 'c'; 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'; rpad_data[randnr - 1] = '\0';