diff options
author | Julien BLACHE <jblache@debian.org> | 2006-01-24 23:14:44 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:26 +0000 |
commit | 9d7d5dc7bfe282d0e3df4ea4111fa4a37f1629a2 (patch) | |
tree | dea383223c2d0e5bbe2012bbc36814fe68112b93 /src/xsane-back-gtk.c | |
parent | a1871913efc67d71e7b355a8a03655cbf12ab07f (diff) | |
parent | 96b92dfa3cb0a3ae876a3e650984a404327cdf93 (diff) |
Imported Debian patch 0.99+0.991-1debian/0.99+0.991-1
Diffstat (limited to 'src/xsane-back-gtk.c')
-rw-r--r-- | src/xsane-back-gtk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/xsane-back-gtk.c b/src/xsane-back-gtk.c index 6599c98..10ac0b3 100644 --- a/src/xsane-back-gtk.c +++ b/src/xsane-back-gtk.c @@ -406,7 +406,7 @@ int xsane_back_gtk_make_path(size_t buf_size, char *buf, const char *prog_name, if (location == XSANE_PATH_TMP) /* tmp dir, add uid */ { - char tmpbuf[256]; + char tmpbuf[TEXTBUFSIZE]; uid_t uid; int fd; @@ -469,7 +469,7 @@ void xsane_back_gtk_set_option(int opt_num, void *val, SANE_Action action) { SANE_Status status; SANE_Int info; - char buf[256]; + char buf[TEXTBUFSIZE]; int old_colors = xsane.xsane_colors; int update_gamma = FALSE; @@ -789,12 +789,12 @@ gint xsane_back_gtk_decision(gchar *title, gchar **xpm_d, gchar *message, gchar void xsane_back_gtk_ipc_dialog_callback(gpointer data, gint source, GdkInputCondition cond) { - char message[256]; + char message[TEXTBUFSIZE]; size_t bytes; DBG(DBG_proc, "xsane_back_gtk_message\n"); - bytes = read(xsane.ipc_pipefd[0], message, 255); + bytes = read(xsane.ipc_pipefd[0], message, sizeof(message)-1); message[bytes] = 0; xsane_back_gtk_decision(ERR_HEADER_CHILD_PROCESS_ERROR, (gchar **) error_xpm, message, BUTTON_CLOSE, 0 /* no reject text */, FALSE); @@ -877,7 +877,7 @@ char *fileselection_filetype = NULL; static void xsane_back_gtk_filetype_callback(GtkWidget *widget, gpointer data) { char *extension, *filename; - char buffer[256]; + char buffer[PATH_MAX]; char *new_filetype = (char *) data; DBG(DBG_proc, "xsane_filetype_callback\n"); @@ -1302,7 +1302,7 @@ static gint xsane_back_gtk_autobutton_update(GtkWidget *widget, DialogElement *e const SANE_Option_Descriptor *opt; SANE_Status status; SANE_Word val; - char buf[256]; + char buf[TEXTBUFSIZE]; DBG(DBG_proc, "xsane_back_gtk_autobutton_update\n"); @@ -1466,7 +1466,7 @@ static void xsane_back_gtk_value_update(GtkAdjustment *adj_data, DialogElement * static void xsane_back_gtk_range_display_value_right_callback(GtkAdjustment *adjust, gpointer data) { - gchar buf[256]; + gchar buf[TEXTBUFSIZE]; int digits = (int) data; GtkLabel *label; |