Format string bug in mysqldumpslow

Bug #781982 reported by Emanuel Bronshtein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: mysql-client-5.1

/usr/bin/mysqldumpslow have format string bug .

test case :
emanuel@emanuel-desktop:/tmp$ cat /tmp/query_slow_log
# User@Host: root[ro%999999999999sot] @ localhost []
# Query_time: 20.000941 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
emanuel@emanuel-desktop:/tmp$ /usr/bin/mysqldumpslow /tmp/query_slow_log
Reading mysql slow query log from /tmp/query_slow_log
Integer overflow in format string for prtf at /usr/bin/mysqldumpslow line 149, <> chunk 1.

the bug can be found at :

    printf "Count: %d Time=%.2fs (%ds) Lock=%.2fs (%ds) Rows=%.1f (%d), $user\@$host\n%s\n\n",
     $c, $at,$t, $al,$l, $ar,$r, $_;

fix :

    printf "Count: %d Time=%.2fs (%ds) Lock=%.2fs (%ds) Rows=%.1f (%d), %s\@%s\n%s\n\n",
     $c, $at,$t, $al,$l, $ar,$r, $user , $host , $_;

Revision history for this message
Chuck Short (zulcss) wrote :

Which version are you using?

Thanks
chuck

Changed in mysql-5.1 (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Emanuel Bronshtein (e3amn2l) wrote :

mysql-client-5.1 package version : 5.1.41-3ubuntu12.10

Steve Beattie (sbeattie)
Changed in mysql-5.1 (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.