summaryrefslogtreecommitdiff
path: root/ext/standard/metaphone.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/metaphone.c')
-rw-r--r--ext/standard/metaphone.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index db985c282e..829164350e 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -183,10 +183,10 @@ static int metaphone(char *word, int word_len, int max_phonemes, char **phoned_w
/*-- Allocate memory for our phoned_phrase --*/
if (max_phonemes == 0) { /* Assume largest possible */
max_buffer_len = word_len;
- *phoned_word = emalloc(sizeof(char) * word_len + 1);
+ *phoned_word = safe_emalloc(sizeof(char), word_len, 1);
} else {
max_buffer_len = max_phonemes;
- *phoned_word = emalloc(sizeof(char) * max_phonemes + 1);
+ *phoned_word = safe_emalloc(sizeof(char), max_phonemes, 1);
}