Skip to content
Latest commit e9ae9a1 @igorsugak igorsugak committed with facebook-github-bot-0 folly/test/json_test: fix heap-buffer-overflow in Json.PrintTo test
Summary:Json.PrintTo test if failing with heap-buffer-overflow asan abort. The problem here comes up
when values of `std::string` and `std::ostrstring::str()` are compared.  `std::ostrstring::str()` returns
*non null* terminated array of `char`s. When compared with `std::string` a read from memory after
the end that array is made. Fixing the test by replacing `std::ostrstream` with `std::ostringstream`,
that does append `\0`.

Reviewed By: yfeldblum

Differential Revision: D2934352

fb-gh-sync-id: c6a5d765c9951716b8a14715702cf3d940c6d723
shipit-source-id: c6a5d765c9951716b8a14715702cf3d940c6d723
..
Failed to load latest commit information.
build folly copyright 2015 -> copyright 2016
detail folly copyright 2015 -> copyright 2016
docs Greatly expand the components overview in Overview.md
experimental Convert Thrift1(2)RequestDispatcher::sendMessage()
futures folly copyright 2015 -> copyright 2016
gen folly copyright 2015 -> copyright 2016
init A common init function for binaries and a default main function for t…
io folly copyright 2015 -> copyright 2016
m4 Make gflags and boost::program_options play nice with each other
portability Switch back to SYS_gettid, and fix
stats folly copyright 2015 -> copyright 2016
test folly/test/json_test: fix heap-buffer-overflow in Json.PrintTo test
ApplyTuple.h folly copyright 2015 -> copyright 2016
Arena-inl.h folly copyright 2015 -> copyright 2016
Arena.h folly copyright 2015 -> copyright 2016
Assume.h folly copyright 2015 -> copyright 2016
AtomicBitSet.h folly copyright 2015 -> copyright 2016
AtomicHashArray-inl.h folly copyright 2015 -> copyright 2016
AtomicHashArray.h folly copyright 2015 -> copyright 2016
AtomicHashMap-inl.h folly copyright 2015 -> copyright 2016
AtomicHashMap.h folly copyright 2015 -> copyright 2016
AtomicLinkedList.h folly copyright 2015 -> copyright 2016
AtomicStruct.h folly copyright 2015 -> copyright 2016
AtomicUnorderedMap.h folly copyright 2015 -> copyright 2016
Baton.h folly copyright 2015 -> copyright 2016
Benchmark.cpp folly copyright 2015 -> copyright 2016
Benchmark.h folly copyright 2015 -> copyright 2016
Bits.cpp folly copyright 2015 -> copyright 2016
Bits.h folly copyright 2015 -> copyright 2016
CPortability.h folly copyright 2015 -> copyright 2016
Checksum.cpp folly copyright 2015 -> copyright 2016
Checksum.h folly copyright 2015 -> copyright 2016
ConcurrentSkipList-inl.h folly copyright 2015 -> copyright 2016
ConcurrentSkipList.h folly copyright 2015 -> copyright 2016
ConditionallyExistent.h ConditionallyExistent<typename>
ContainerTraits.h folly copyright 2015 -> copyright 2016
Conv.cpp folly copyright 2015 -> copyright 2016
Conv.h folly copyright 2015 -> copyright 2016
CppAttributes.h folly copyright 2015 -> copyright 2016
CpuId.h folly copyright 2015 -> copyright 2016
Demangle.cpp folly copyright 2015 -> copyright 2016
Demangle.h folly copyright 2015 -> copyright 2016
DiscriminatedPtr.h folly copyright 2015 -> copyright 2016
DynamicConverter.h folly copyright 2015 -> copyright 2016
EvictingCacheMap.h folly copyright 2015 -> copyright 2016
Exception.h folly copyright 2015 -> copyright 2016
ExceptionWrapper.h folly copyright 2015 -> copyright 2016
Executor.h folly copyright 2015 -> copyright 2016
FBString.h folly copyright 2015 -> copyright 2016
FBVector.h folly copyright 2015 -> copyright 2016
File.cpp folly copyright 2015 -> copyright 2016
File.h folly copyright 2015 -> copyright 2016
FileUtil.cpp folly copyright 2015 -> copyright 2016
FileUtil.h folly copyright 2015 -> copyright 2016
Fingerprint.h folly copyright 2015 -> copyright 2016
Foreach.h folly copyright 2015 -> copyright 2016
Format-inl.h folly copyright 2015 -> copyright 2016
Format.cpp folly copyright 2015 -> copyright 2016
Format.h folly copyright 2015 -> copyright 2016
FormatArg.h folly copyright 2015 -> copyright 2016
FormatTraits.h folly copyright 2015 -> copyright 2016
GroupVarint.cpp folly copyright 2015 -> copyright 2016
GroupVarint.h folly copyright 2015 -> copyright 2016
Hash.h folly copyright 2015 -> copyright 2016
IPAddress.cpp folly copyright 2015 -> copyright 2016
IPAddress.h folly copyright 2015 -> copyright 2016
IPAddressException.h folly copyright 2015 -> copyright 2016
IPAddressV4.cpp folly copyright 2015 -> copyright 2016
IPAddressV4.h folly copyright 2015 -> copyright 2016
IPAddressV6.cpp folly copyright 2015 -> copyright 2016
IPAddressV6.h folly copyright 2015 -> copyright 2016
IndexedMemPool.h folly copyright 2015 -> copyright 2016
IntrusiveList.h folly copyright 2015 -> copyright 2016
Lazy.h folly copyright 2015 -> copyright 2016
LifoSem.cpp folly copyright 2015 -> copyright 2016
LifoSem.h folly copyright 2015 -> copyright 2016
Likely.h folly copyright 2015 -> copyright 2016
Logging.h folly copyright 2015 -> copyright 2016
MPMCPipeline.h folly copyright 2015 -> copyright 2016
MPMCQueue.h folly copyright 2015 -> copyright 2016
MacAddress.cpp folly copyright 2015 -> copyright 2016
MacAddress.h folly copyright 2015 -> copyright 2016
Makefile.am ConditionallyExistent<typename>
Malloc.h folly copyright 2015 -> copyright 2016
MapUtil.h folly copyright 2015 -> copyright 2016
Memory.h folly copyright 2015 -> copyright 2016
MemoryMapping.cpp folly copyright 2015 -> copyright 2016
MemoryMapping.h folly copyright 2015 -> copyright 2016
Merge.h folly copyright 2015 -> copyright 2016
MicroSpinLock.h folly copyright 2015 -> copyright 2016
MoveWrapper.h folly copyright 2015 -> copyright 2016
Optional.h folly copyright 2015 -> copyright 2016
PackedSyncPtr.h folly copyright 2015 -> copyright 2016
Padded.h folly copyright 2015 -> copyright 2016
PicoSpinLock.h folly copyright 2015 -> copyright 2016
Portability.h folly copyright 2015 -> copyright 2016
Preprocessor.h folly copyright 2015 -> copyright 2016
ProducerConsumerQueue.h folly copyright 2015 -> copyright 2016
RWSpinLock.h folly copyright 2015 -> copyright 2016
Random-inl.h folly copyright 2015 -> copyright 2016
Random.cpp folly copyright 2015 -> copyright 2016
Random.h folly copyright 2015 -> copyright 2016
Range.h folly copyright 2015 -> copyright 2016
SafeAssert.cpp folly copyright 2015 -> copyright 2016
SafeAssert.h folly copyright 2015 -> copyright 2016
ScopeGuard.h folly copyright 2015 -> copyright 2016
SharedMutex.cpp folly copyright 2015 -> copyright 2016
SharedMutex.h folly copyright 2015 -> copyright 2016
Singleton-inl.h folly copyright 2015 -> copyright 2016
Singleton.cpp folly copyright 2015 -> copyright 2016
Singleton.h folly copyright 2015 -> copyright 2016
SingletonStackTrace.cpp folly copyright 2015 -> copyright 2016
SingletonThreadLocal.h Improve RequestContext::getStaticContext() perf
SingletonVault_c.cpp folly copyright 2015 -> copyright 2016
SingletonVault_c.h folly copyright 2015 -> copyright 2016
SmallLocks.h folly copyright 2015 -> copyright 2016
SocketAddress.cpp folly copyright 2015 -> copyright 2016
SocketAddress.h folly copyright 2015 -> copyright 2016
SparseByteSet.h folly copyright 2015 -> copyright 2016
SpinLock.h folly copyright 2015 -> copyright 2016
SpookyHashV1.cpp folly copyright 2015 -> copyright 2016
SpookyHashV1.h folly copyright 2015 -> copyright 2016
SpookyHashV2.cpp folly copyright 2015 -> copyright 2016
SpookyHashV2.h folly copyright 2015 -> copyright 2016
String-inl.h folly copyright 2015 -> copyright 2016
String.cpp fix -Wshadowing in String.cpp
String.h stripLeftMargin
StringBase.cpp folly copyright 2015 -> copyright 2016
Subprocess.cpp folly copyright 2015 -> copyright 2016
Subprocess.h folly copyright 2015 -> copyright 2016
Synchronized.h folly copyright 2015 -> copyright 2016
ThreadCachedArena.cpp folly copyright 2015 -> copyright 2016
ThreadCachedArena.h folly copyright 2015 -> copyright 2016
ThreadCachedInt.h folly copyright 2015 -> copyright 2016
ThreadLocal.h folly copyright 2015 -> copyright 2016
ThreadName.h folly copyright 2015 -> copyright 2016
TimeoutQueue.cpp folly copyright 2015 -> copyright 2016
TimeoutQueue.h folly copyright 2015 -> copyright 2016
TokenBucket.h folly copyright 2015 -> copyright 2016
Traits.h folly copyright 2015 -> copyright 2016
Unicode.cpp folly copyright 2015 -> copyright 2016
Unicode.h folly copyright 2015 -> copyright 2016
Uri-inl.h folly copyright 2015 -> copyright 2016
Uri.cpp folly copyright 2015 -> copyright 2016
Uri.h folly copyright 2015 -> copyright 2016
VERSION Bump version to 57:0
Varint.h folly copyright 2015 -> copyright 2016
Version.cpp folly copyright 2015 -> copyright 2016
VersionCheck.h folly copyright 2015 -> copyright 2016
configure.ac Make advanced init function for test optional
dynamic-inl.h folly copyright 2015 -> copyright 2016
dynamic.cpp folly copyright 2015 -> copyright 2016
dynamic.h folly copyright 2015 -> copyright 2016
json.cpp folly copyright 2015 -> copyright 2016
json.h folly copyright 2015 -> copyright 2016
memcpy.S folly copyright 2015 -> copyright 2016
small_vector.h folly copyright 2015 -> copyright 2016
sorted_vector_types.h folly copyright 2015 -> copyright 2016
Something went wrong with that request. Please try again.