[gparted] Fix for loop limit in fat16::sanitize_label()
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Fix for loop limit in fat16::sanitize_label()
- Date: Sat, 14 Jan 2017 15:55:11 +0000 (UTC)
commit fbd39b81e372e4caef37fa594983ffb39a2b4bf1
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Fri Dec 16 07:15:06 2016 +0000
Fix for loop limit in fat16::sanitize_label()
Use the same uppercase_label string to determine the limit of the for
loop as is actually accessed.
src/fat16.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/fat16.cc b/src/fat16.cc
index 7b3224d..178f10d 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -265,7 +265,7 @@ const Glib::ustring fat16::sanitize_label( const Glib::ustring &label ) const
// [2] Replicated in Wikikedia: label (command)
// https://en.wikipedia.org/wiki/Label_%28command%29
Glib::ustring prohibited_chars( "*?.,;:/\\|+=<>[]" );
- for ( unsigned int i = 0 ; i < label.size() ; i ++ )
+ for ( unsigned int i = 0 ; i < uppercase_label.size() ; i ++ )
if ( prohibited_chars.find( uppercase_label[i] ) == Glib::ustring::npos )
new_label.push_back( uppercase_label[i] );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]