← Commit list

062913f66

Manuel Novoa III
Manuel Novoa III
2003-08-14
FAILED Duration: 88s

Subject

Fix a bug reported by [email protected] involving the mode_chars index.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/mode_string.c+6 -1
@@ -20,6 +20,11 @@
*
*/
+/* Aug 13, 2003
+ * Fix a bug reported by [email protected] involving the mode_chars index.
+ */
+
+
#include <assert.h>
#include <sys/stat.h>
@@ -119,7 +124,7 @@ const char *bb_mode_string(int mode)
} while (++j < 3);
++i;
if (mode & (010000 >> i)) {
- *p = mode_chars[3 + k + (i >> 1)];
+ *p = mode_chars[3 + (k & 2) + (i == 3)];
}
} while (i < 3);