new-call-box: Use null-terminated string to set as buffer text

gtk_entry_buffer_insert_text expects a null-terminated string.

This was found when testing with asan.
This commit is contained in:
Mohammed Sadiq 2019-01-28 18:50:39 +05:30
parent 7481e022f1
commit d4b6e92fc1
1 changed files with 2 additions and 1 deletions

View File

@ -65,8 +65,9 @@ dial_pad_symbol_clicked_cb (CallsNewCallBox *self,
{
GtkEntryBuffer *buf = gtk_entry_get_buffer (GTK_ENTRY (self->number_entry));
guint len = gtk_entry_buffer_get_length (buf);
const gchar str[] = {symbol, '\0'};
gtk_entry_buffer_insert_text (buf, len, &symbol, 1);
gtk_entry_buffer_insert_text (buf, len, str, 1);
}