471
485
_parse_pam_args (pamh, flags, argc, argv);
475
487
x11_display = display_device;
477
489
} else if (strncmp (_PATH_DEV, display_device, 5) != 0) {
478
490
- snprintf (ttybuf, sizeof (ttybuf), _PATH_DEV "%s", display_device);
479
491
+ int len = strlen (_PATH_DEV) + strlen (display_device) + 1;
481
497
+ snprintf (ttybuf, len, _PATH_DEV "%s", display_device);