The SAMATE Project Department of Homeland Security
Downloads:  Selected

Back to the previous page...Back to the previous page

Test Case IDDeprecated1456
Bad / GoodGoodGood test case
AuthorN/A
Associated test caseN/A
ContributorKlocwork
LanguageC
Type of test caseSource Code
Input stringN/A
Expected OutputN/A
InstructionsN/A
Submission date2006-02-21
DescriptioniconInteger pointer is assigned a value within current buffer.
Filename

There is 1 comment :: Submit a comment :: RSS

See the comments

Comment #1 :: Syntax error - replaced
Syntax error: closing paren replaced by special character. Replaced by case 2078
Posted by Paul E. Black :: 2009-04-03 15:19:53

>./ipar_014.c
  1. /*
  2. © 2000-2005 Klocwork Inc.  All rights reserved.
  3. Permission is hereby granted, to use, copy, modify, and distribute this software
  4. and its documentation for any purpose, provided that the above copyright notice
  5. and the following three  paragraphs appear in all copies of this software:
  6. 1.      IN NO EVENT SHALL KLOCWORK INC. BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
  7.         SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
  8.         SOFTWARE  AND ITS DOCUMENTATION, EVEN IF KLOCWORK INC. HAS BEEN ADVISED OF THE
  9.         POSSIBILITY OF SUCH DAMAGE.
  10. 2.      KLOCWORK INC. HEREBY EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OR CONDITIONS,
  11.         INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY,
  12.         FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
  13. 3.      THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND KLOCWORK INC. HAS NO OBLIGATION
  14.         TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  15. Restricted Rights. The Software (a) was developed at private expense, is existing
  16. computer software and no part of it was developed with government funds,
  17. (b) is “restricted computer software” licensed in accordance with restricted rights
  18. provisions of subparagraphs (a) through (d) of the Commercial Computer Software-Restricted
  19. Rights clause FAR 52.227-19 and its successors, and
  20. (c) is unpublished and all rights are reserved under the copyrights laws of the
  21. United States. Use, duplication, or disclosure by the U.S. Government is also subject to
  22. restrictions as set forth herein and in DFARS 227.7202-1(a) and 227.7202-3(a) (1995),
  23. DFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR 12.212(a) 1995, or FAR 52.227-14,
  24. as applicable.  Only the rights to the Software set forth above are provided.
  25. */
  26.  
  27.  
  28. typedef unsigned long size_t;
  29.  
  30. void foo(void)
  31. {
  32.         int a;
  33.         int *pint = &a;
  34.         pint = pint + (sizeof(a)/sizeof(int));
  35.