diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php
index 6fc2a87..8b8c1d6 100644
--- a/core/lib/Drupal/Core/Config/Config.php
+++ b/core/lib/Drupal/Core/Config/Config.php
@@ -65,6 +65,18 @@ class Config {
   protected $eventDispatcher;
 
   /**
+   * The maximum length of a configuration object name.
+   *
+   * Many filesystems (including HFS, NTFS, and ext4) have a maximum file name
+   * length of 255 characters. To ensure that no configuration objects
+   * incompatible with this limitation are created, we enforce a maximum name
+   * length of 250 characters (leaving 5 characters for the file extension).
+   *
+   * @see http://en.wikipedia.org/wiki/Comparison_of_file_systems
+   */
+  const MAX_NAME_LENGTH = 250;
+
+  /**
    * Constructs a configuration object.
    *
    * @param string $name
@@ -347,6 +359,9 @@ public function load() {
    *   The configuration object.
    */
   public function save() {
+    if (strlen($this->name) > self::MAX_NAME_LENGTH) {
+      throw new ConfigNameTooLongException();
+    }
     $this->storage->write($this->name, $this->data);
     $this->isNew = FALSE;
     $this->notify('save');
diff --git a/core/lib/Drupal/Core/Config/ConfigNameTooLongException.php b/core/lib/Drupal/Core/Config/ConfigNameTooLongException.php
new file mode 100644
index 0000000..1d1a2ef
--- /dev/null
+++ b/core/lib/Drupal/Core/Config/ConfigNameTooLongException.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Contains \Drupal\Core\Config\ConfigNameTooLongException.
+ */
+
+namespace Drupal\Core\Config;
+
+/**
+ * Defines an exception thrown when a config object name is longer than allowed.
+ *
+ * @see \Drupal\Core\Config\Config::MAX_NAME_LENGTH
+ */
+class ConfigNameTooLongException extends ConfigException {}
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
index 56e5ecf..4d2ec46 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\config\Tests;
 
+use Drupal\Core\Config\ConfigNameTooLongException;
 use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
@@ -101,6 +102,18 @@ function testCRUD() {
     $new_config->save();
     $this->assertIdentical($new_config->get('value'), $expected_values['value']);
     $this->assertIdentical($new_config->get('404'), $expected_values['404']);
+
+    // Try to save an object with a name longer than 250 characters.
+    $long_name = 'config_test.herman_melville.moby_dick_or_the_whale.harper_1851.now_small_fowls_flew_screaming_over_the_yet_yawning_gulf_a_sullen_white_surf_beat_against_its_steep_sides_then_all_collapsed_and_the_great_shroud_of_the_sea_rolled_on_as_it_rolled_five_thousand_years_ago';
+    $long_name_config = config($long_name);
+    $this->assertIdentical($long_name_config->isNew(), TRUE);
+    $long_name_config->set('pages', 608);
+    try {
+      $long_name_config->save();
+    }
+    catch (ConfigNameTooLongException $e) {}
+    $this->assertTrue($e, 'An exception is thrown when a configuration object name is too long.');
+    $this->assertIdentical($long_name_config->isNew(), TRUE);
   }
 
 }
