Index: advpoll.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/advpoll/advpoll.module,v
retrieving revision 1.21.2.74
diff -u -p -r1.21.2.74 advpoll.module
--- advpoll.module	10 Oct 2007 09:37:38 -0000	1.21.2.74
+++ advpoll.module	1 Dec 2007 20:50:25 -0000
@@ -14,6 +14,7 @@ define('ADVPOLL_WRITEINS', 0);
 define('ADVPOLL_SHOW_WRITEINS', 0);
 define('ADVPOLL_INITIAL_CHOICES', 5);
 define('ADVPOLL_USE_QUESTION', 0);
+define('ADVPOLL_MAX_LENGTH', 2048);
 // Options: always, aftervote, or afterclose.
 define('ADVPOLL_VIEW_RESULTS', 'aftervote');
 
@@ -325,6 +326,7 @@ function advpoll_form($node, $form_value
         '#title' => t('Choice %n', array('%n' => $current_choices + 1)) . ($choice['writein'] ? ' '. t('(write-in)') : ''),
         '#default_value' => $choice['label'],
         '#attributes' => array('class' => 'choices'),
+        '#maxlength' => ADVPOLL_MAX_LENGTH,
       );
       $current_choices++;
       $next_index = $index + 1;
@@ -341,6 +343,7 @@ function advpoll_form($node, $form_value
         '#type' => 'textfield',
         '#title' => t('Choice %n', array('%n' => $current_choices + 1)),
         '#attributes' => array('class' => 'choices'),
+        '#maxlength' => ADVPOLL_MAX_LENGTH,
       );
     }
   }
