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

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 1754183003: Add a few more FuzzTraits to the IPC fuzzer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 497619aa4c80b8d6638b656eee5279bbdb7d7d45..ab5d93256231c22761f8b577ce9b61643c4e1aba 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -155,8 +155,8 @@ struct FuzzTraits<unsigned short> {
};
template <>
-struct FuzzTraits<char> {
- static bool Fuzz(char* p, Fuzzer* fuzzer) {
+struct FuzzTraits<signed char> {
+ static bool Fuzz(signed char* p, Fuzzer* fuzzer) {
fuzzer->FuzzUChar(reinterpret_cast<unsigned char*>(p));
return true;
}
@@ -1430,6 +1430,20 @@ struct FuzzTraits<media::AudioParameters> {
};
template <>
+struct FuzzTraits<media::cast::RtpTimeTicks> {
+ static bool Fuzz(media::cast::RtpTimeTicks* p, Fuzzer* fuzzer) {
+ base::TimeDelta delta;
+ int base;
+ if (!FuzzParam(&delta, fuzzer))
+ return false;
+ if (!FuzzParam(&base, fuzzer))
+ return false;
+ *p = media::cast::RtpTimeTicks::FromTimeDelta(delta, base);
+ return true;
+ }
+};
+
+template <>
struct FuzzTraits<media::VideoCaptureFormat> {
static bool Fuzz(media::VideoCaptureFormat* p, Fuzzer* fuzzer) {
if (!FuzzParam(&p->frame_size, fuzzer))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698