Skip to content

Commit cad2207

Browse files
committed
Fix bogus size calculation introduced by commit cc5f813.
The elements of RecordCacheArray are TupleDesc, not TupleDesc *. Those are actually the same size, so that this error is harmless, but it's still wrong --- and it might bite us someday, if TupleDesc ever became a struct, say. Per Coverity.
1 parent 936df5b commit cad2207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/cache/typcache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ ensure_record_cache_typmod_slot_exists(int32 typmod)
13861386
RecordCacheArray = (TupleDesc *) repalloc(RecordCacheArray,
13871387
newlen * sizeof(TupleDesc));
13881388
memset(RecordCacheArray + RecordCacheArrayLen, 0,
1389-
(newlen - RecordCacheArrayLen) * sizeof(TupleDesc *));
1389+
(newlen - RecordCacheArrayLen) * sizeof(TupleDesc));
13901390
RecordCacheArrayLen = newlen;
13911391
}
13921392
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy