Commit 8a4a6333 authored by Dominique Leuenberger's avatar Dominique Leuenberger Committed by Jim Nelson

Crash when importing AVI file: Closes #7413

Fixes some unsafe scanf() parameters.
parent f564c75f
......@@ -38,6 +38,7 @@ Till Kamppeter <till.kamppeter@gmail.com>
Richard B. Kreckel <kreckel@ginac.de>
Andreas Kühntopf <andreas@kuehntopf.org>
Damien Lallement <mageia@damsweb.net>
Dominique Leuenberger <dimstar@opensuse.org>
Dominic Lloyd <dwlloyd@telus.net>
Tobias Lott <tobias@lott.eu.org>
Gavrilov Maksim <ulltor@gmail.com>
......
......@@ -437,9 +437,9 @@ private class AVIMetadataLoader {
Date date = Date();
uint seconds = 0;
int year, month, day, hour, min, sec;
string weekday = "";
string monthstr = "";
char weekday[4];
char monthstr[4];
if (sdate[0].isdigit()) {
// Format is: 2005:08:17 11:42:43
// Format is: 2010/11/30/ 19:42
......@@ -459,7 +459,7 @@ private class AVIMetadataLoader {
out min, out sec, out year)) {
return 0; // Error
}
date.set_dmy((DateDay) day, month_from_string(monthstr), (DateYear) year);
date.set_dmy((DateDay) day, month_from_string((string) monthstr), (DateYear) year);
seconds = sec + min * 60 + hour * 3600;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment