Skip to content

Commit 850e89f

Browse files
author
nixnodes
committed
fixed buffer overrun in LOM math argument processing
1 parent 4a71abf commit 850e89f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* 2.6.7:
4040
* - % Removed 'glconf.h' dependancy when compiling the filesystem search utility
4141
* - ~ Fixed segfault when running dirlog update on a very small log
42+
* - ~ Fixed buffer overrun in LOM math argument processing
4243
*
4344
* v2.5:
4445
*

src/m_lom.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ g_get_lom_g_t_ptr (__g_handle hdl, char *field, __g_lom lom, uint32_t flags)
837837
md_init (&lom->math_r, 8);
838838

839839
size_t field_l = strlen (field);
840-
char *m_field = calloc (field_l, 1);
840+
char *m_field = calloc (field_l + 1, 1);
841841
if (copy_and_term_math_field (field, m_field, field_l))
842842
{
843843
free (m_field);

0 commit comments

Comments
 (0)