Commit e3e52c8f9ab176f65b147d20d58bb7940bd2356a
1 parent
f8b40fd8
Exists in
master
and in
2 other branches
Fixing code scanning alerts.
Showing
3 changed files
with
18 additions
and
3 deletions
Show diff stats
src/core/charset/view.c
... | ... | @@ -58,7 +58,11 @@ LIB3270_EXPORT int lib3270_charsettable(H3270 *hSession) |
58 | 58 | |
59 | 59 | trace("%s","Showing charset table"); |
60 | 60 | |
61 | - (void) memset((char *) hSession->ea_buf, 0, hSession->view.rows * hSession->view.cols * sizeof(struct lib3270_ea)); | |
61 | + (void) memset( | |
62 | + (char *) hSession->ea_buf, | |
63 | + 0, | |
64 | + ((size_t) hSession->view.rows) * ((size_t) hSession->view.cols) * sizeof(struct lib3270_ea) | |
65 | + ); | |
62 | 66 | |
63 | 67 | baddr = margin_left+hSession->max.cols; |
64 | 68 | s = (hSession->max.cols * 0x11); | ... | ... |
src/core/rpq.c
... | ... | @@ -438,7 +438,10 @@ static int get_rpq_timezone(H3270 *hSession) |
438 | 438 | rpq_warning(hSession, _("RPQ: Unable to determine workstation local time")); |
439 | 439 | return 1; |
440 | 440 | } |
441 | - memcpy(&here_tm, localtime(&here), sizeof(struct tm)); | |
441 | + | |
442 | + | |
443 | +// memcpy(&here_tm, localtime(&here), sizeof(struct tm)); | |
444 | + localtime_r(&here, &here_tm); | |
442 | 445 | |
443 | 446 | if ((utc_tm = gmtime(&here)) == NULL) |
444 | 447 | { | ... | ... |
src/core/util.c
... | ... | @@ -264,7 +264,15 @@ void lib3270_popup_an_errno(H3270 *hSession, int errn, const char *fmt, ...) |
264 | 264 | |
265 | 265 | lib3270_write_log(hSession, "3270", "Error Popup:\n%s\nrc=%d (%s)",text,errn,strerror(errn)); |
266 | 266 | |
267 | - lib3270_popup_dialog(hSession, LIB3270_NOTIFY_ERROR, _( "Error" ), text, "%s (rc=%d)", errn, strerror(errn)); | |
267 | + lib3270_popup_dialog( | |
268 | + hSession, | |
269 | + LIB3270_NOTIFY_ERROR, | |
270 | + _( "Error" ), | |
271 | + text, | |
272 | + "%s (rc=%d)", | |
273 | + strerror(errn), | |
274 | + errn | |
275 | + ); | |
268 | 276 | |
269 | 277 | lib3270_free(text); |
270 | 278 | ... | ... |