diff options
Diffstat (limited to 'storage/connect/plugutil.cpp')
-rw-r--r-- | storage/connect/plugutil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp index f481cd1034b..d131482ef94 100644 --- a/storage/connect/plugutil.cpp +++ b/storage/connect/plugutil.cpp @@ -478,7 +478,7 @@ bool AllocSarea(PGLOBAL g, size_t size) g->Sarea = malloc(size); if (!g->Sarea) { - sprintf(g->Message, MSG(MALLOC_ERROR), "malloc"); + snprintf(g->Message, sizeof(g->Message), MSG(MALLOC_ERROR), "malloc"); g->Sarea_Size = 0; } else { g->Sarea_Size = size; @@ -574,7 +574,7 @@ void *PlugSubAlloc(PGLOBAL g, void *memp, size_t size) if (size > pph->FreeBlk) { /* Not enough memory left in pool */ PCSZ pname = "Work"; - sprintf(g->Message, + snprintf(g->Message, sizeof(g->Message), "Not enough memory in %-.256s area for request of %zu (used=%zu free=%zu)", pname, size, pph->To_Free, pph->FreeBlk); |