Index: wp-admin/edit.php
===================================================================
--- wp-admin/edit.php	(revision 7627)
+++ wp-admin/edit.php	(working copy)
@@ -205,7 +205,7 @@
 
 if ( 1 == count($posts) && is_singular() ) :
 
-	$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
+	$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
 	if ( $comments ) :
 		// Make sure comments, post, and post_author are cached
 		update_comment_cache($comments);
Index: wp-admin/edit-pages.php
===================================================================
--- wp-admin/edit-pages.php	(revision 7627)
+++ wp-admin/edit-pages.php	(working copy)
@@ -175,7 +175,7 @@
 
 if ( 1 == count($posts) && is_singular() ) :
 
-	$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
+	$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) );
 	if ( $comments ) :
 		// Make sure comments, post, and post_author are cached
 		update_comment_cache($comments);
