mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1039822 - Make sure FrameMetrics::mContentDescription is null-terminated after being read from IPC. r=kats
This commit is contained in:
parent
75d95947f6
commit
dcc1836e1c
@ -802,6 +802,7 @@ struct ParamTraits<mozilla::layers::FrameMetrics>
|
||||
// a pointer to the string in its internal buffer.
|
||||
strncpy(aResult->mContentDescription, contentDescription,
|
||||
sizeof(aResult->mContentDescription));
|
||||
aResult->mContentDescription[sizeof(aResult->mContentDescription) - 1] = '\0';
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user