Skip to content

Commit f058d3c

Browse files
committed
fix #41 warning strcpy and DES
1 parent e13d373 commit f058d3c

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

ChangeLog

Whitespace-only changes.

NEWS

Whitespace-only changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ terminal, will display the two bytes of data starting with byte 6.
118118
Building mfterm
119119
---------------
120120

121-
Standard: ./configure; make; make install
121+
Standard: ./autogen.sh; ./configure; make; make install
122122

123123
See INSTALL file for details.
124124

mac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ int compute_mac(const unsigned char* input,
4545

4646
// Generate a key schedule. Don't be picky, allow bad keys.
4747
DES_key_schedule schedule;
48+
#pragma GCC diagnostic push
49+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4850
DES_set_key_unchecked(&des_key, &schedule);
51+
#pragma GCC diagnostic pop
4952

5053
// IV is all zeroes
5154
unsigned char ivec[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
5255

5356
// Compute the DES in CBC
57+
#pragma GCC diagnostic push
58+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
5459
DES_ncbc_encrypt(padded_input, output, length, &schedule, &ivec, 1);
60+
#pragma GCC diagnostic pop
5561

5662
// Move up and truncate (we only want 8 bytes)
5763
for (int i = 0; i < 8; ++i)

mfterm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ char* completion_sub_cmd_generator(const char* text, int state) {
260260

261261
// Extract command and sub-command
262262
char buff[128];
263+
#pragma GCC diagnostic push
264+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
263265
strncpy(buff, name, sizeof(buff));
266+
#pragma GCC diagnostic pop
264267
char* cmd = strtok(buff, " ");
265268
char* sub = strtok(NULL, " ");
266269

0 commit comments

Comments
 (0)