diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5b3dd73f190298f13a1088b2177dec5dcc1e20b2..0f4c688c0f2ea7e193d6948e288e7da9a3337229 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -14897,8 +14897,8 @@ static int vm_test_destroy_user(const char *context, const char *mailbox)
 
 	AST_LIST_LOCK(&users);
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&users, vmu, list) {
-		if (!strncmp(context, vmu->context, sizeof(context))
-			&& !strncmp(mailbox, vmu->mailbox, sizeof(mailbox))) {
+		if (!strcmp(context, vmu->context)
+			&& !strcmp(mailbox, vmu->mailbox)) {
 			AST_LIST_REMOVE_CURRENT(list);
 			ast_free(vmu);
 			break;