[Bug 781982] [NEW] Format string bug in mysqldumpslow

Emanuel Bronshtein 781982 at bugs.launchpad.net
Fri May 13 03:19:21 UTC 2011


Public bug reported:

Binary package hint: mysql-client-5.1

/usr/bin/mysqldumpslow have format string bug .

test case :
emanuel at emanuel-desktop:/tmp$ cat /tmp/query_slow_log
# User at Host: root[ro%999999999999sot] @ localhost []
# Query_time: 20.000941  Lock_time: 0.000000 Rows_sent: 1  Rows_examined: 0
emanuel at 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 , $_;

** Affects: mysql-5.1 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in Ubuntu.
https://bugs.launchpad.net/bugs/781982

Title:
  Format string bug in mysqldumpslow



More information about the Ubuntu-server-bugs mailing list