The Great Whitespace Cleanup
[sxemacs] / src / ui / lwlib / xlwtabs.c
index b03780b..bcafe58 100644 (file)
@@ -16,7 +16,7 @@ General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
- /* Synched up with: Tabs.c 1.27.  
+ /* Synched up with: Tabs.c 1.27.
 
     #### This file contains essential XEmacs related fixes to the original
     verison of the Tabs widget. Be VERY careful about syncing if you ever
@@ -1233,9 +1233,10 @@ void XawTabsSetTop(Widget w, Bool callCallbacks)
 
        if (!XtIsSubclass(w->core.parent, tabsWidgetClass)) {
                char line[256];
-               sprintf(line,
+               int n = snprintf(line, sizeof(line),
                        "XawTabsSetTop: widget \"%.64s\" is not the child of a tabs widget.",
                        XtName(w));
+               assert(n >= 0 && (size_t)n < sizeof(line));
                XtAppWarning(XtWidgetToApplicationContext(w), line);
                return;
        }