Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch

Issue 2345493002: Uprev libmtp to 1.1.12 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libmtp@master
Patch Set: Re-upload cl Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/04_parse_extension_descriptor_null_check.patch ('k') | patches/08_add_licenses.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch
diff --git a/patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch b/patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch
deleted file mode 100644
index 4e7f8e8ccc2d2ac1206aac91bf53594b5d3b77af..0000000000000000000000000000000000000000
--- a/patches/07_fix_strcpy_in_ptp_unpack_ptptime.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Index: src/ptp-pack.c
-===================================================================
---- src/ptp-pack.c (revision 148712)
-+++ src/ptp-pack.c (working copy)
-@@ -533,7 +533,7 @@
- ptp_unpack_PTPTIME (const char *str) {
- char ptpdate[40];
- char tmp[5];
-- int ptpdatelen;
-+ size_t ptpdatelen;
- struct tm tm;
-
- if (!str)
-@@ -543,11 +543,12 @@
- /*ptp_debug (params ,"datelen is larger then size of buffer", ptpdatelen, (int)sizeof(ptpdate));*/
- return 0;
- }
-- strcpy (ptpdate, str);
- if (ptpdatelen<15) {
- /*ptp_debug (params ,"datelen is less than 15 (%d)", ptpdatelen);*/
- return 0;
- }
-+ strncpy (ptpdate, str, sizeof(ptpdate));
-+ ptpdate[sizeof(ptpdate) - 1] = '\0';
-
- memset(&tm,0,sizeof(tm));
- strncpy (tmp, ptpdate, 4);
« no previous file with comments | « patches/04_parse_extension_descriptor_null_check.patch ('k') | patches/08_add_licenses.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698