walter harms wrote:
> 
> Am 14.12.2010 01:40, schrieb Alan Coopersmith:
>> Signed-off-by: Alan Coopersmith <[email protected]>
>> ---
>>  src/Selection.c |    3 ++-
>>  src/Shell.c     |    5 +++--
>>  2 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/Selection.c b/src/Selection.c
>> index 1759c02..a138c8b 100644
>> --- a/src/Selection.c
>> +++ b/src/Selection.c
>> @@ -226,7 +226,8 @@ static Atom GetSelectionProperty(
>>   propCount = sarray->propCount++;
>>   sarray->list = (SelectionProp) XtRealloc((XtPointer)sarray->list,
>>              (unsigned)(sarray->propCount*sizeof(SelectionPropRec)));
>> - (void) sprintf(propname, "%s%d", "_XT_SELECTION_", propCount);
>> + (void) snprintf(propname, sizeof(propname), "%s%d",
>> +             "_XT_SELECTION_", propCount);
> 
> why not snprintf(propname, sizeof(propname), "_XT_SELECTION_%d",propCount); ?

Because I didn't notice the %s pointed to a constant string.   That's easy to
fix.

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to